/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 科技感背景动画 */
@keyframes backgroundAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 25%, #90caf9 50%, #64b5f6 75%, #42a5f5 100%);
    background-size: 400% 400%;
    animation: backgroundAnimation 15s ease infinite;
    min-height: 100vh;
    color: #0d47a1;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 0 30px;
    animation: fadeInDown 1s ease-out;
}

.header-content {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(13, 71, 161, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(66, 165, 245, 0.8), 2px 2px 4px rgba(13, 71, 161, 0.3);
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    color: #e3f2fd;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(66, 165, 245, 0.5);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(13, 71, 161, 0.2);
    animation: fadeInUp 1s ease-out 0.3s both;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 表单样式 */
.story-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    color: #e3f2fd;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(66, 165, 245, 0.3);
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.form-input,
.form-textarea {
    padding: 15px;
    border: 2px solid rgba(66, 165, 245, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #42a5f5;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.3), 0 0 20px rgba(66, 165, 245, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.textarea-info {
    font-size: 0.85rem;
    color: #bbdefb;
    text-align: right;
    margin-top: 5px;
    text-shadow: 0 0 5px rgba(66, 165, 245, 0.3);
}

/* 文件上传样式 */
.file-upload-container {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-area {
    border: 2px dashed rgba(66, 165, 245, 0.5);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.file-upload-area:hover {
    border-color: #42a5f5;
    background: rgba(66, 165, 245, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(66, 165, 245, 0.3);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #42a5f5;
    text-shadow: 0 0 10px rgba(66, 165, 245, 0.5);
}

.upload-text {
    font-size: 1.1rem;
    color: #e3f2fd;
    margin-bottom: 5px;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(66, 165, 245, 0.3);
}

.upload-hint {
    font-size: 0.9rem;
    color: #bbdefb;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f0f8ff;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e1ecff;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    color: #e3f2fd;
    font-weight: 500;
}

.file-size {
    font-size: 0.8rem;
    color: #bbdefb;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #ff5252;
    transform: scale(1.1);
}

/* 提交按钮 */
.submit-button {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 50%, #0d47a1 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
    letter-spacing: 1px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.6), 0 0 20px rgba(66, 165, 245, 0.4);
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 50%, #1565c0 100%);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: inline-block;
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

/* 错误信息 */
.error-message {
    color: #ff8a80;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    text-shadow: 0 0 5px rgba(255, 138, 128, 0.3);
}

.error-message.show {
    display: block;
}

.form-input.error,
.form-textarea.error {
    border-color: #e74c3c;
    background: rgba(255, 138, 128, 0.1);
}

/* 成功模态框 */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #00e676;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
}

.success-title {
    font-size: 1.5rem;
    color: #00e676;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.success-message {
    color: #5a3e36;
    margin-bottom: 25px;
    line-height: 1.5;
}

.close-modal {
    background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4);
}

.close-modal:hover {
    background: linear-gradient(135deg, #1bff8c 0%, #00e676 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.6);
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 鲸鱼视频背景 - 优化版 */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.whale-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out;
}

.whale-video.loaded {
    opacity: 0.2;
}

.fallback-animation {
    position: absolute;
    bottom: 50px;
    right: 50px;
    opacity: 0.8;
    animation: whale-float 8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(25, 118, 210, 0.3));
    display: none;
}

@keyframes whale-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(-5px) translateX(-5px);
    }
    75% {
        transform: translateY(-15px) translateX(3px);
    }
}

/* 视频加载指示器 */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.video-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(66, 165, 245, 0.3);
    border-top: 3px solid #42a5f5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: #42a5f5;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(66, 165, 245, 0.5);
}



/* 性能优化：减少动画复杂度 */
@media (prefers-reduced-motion: reduce) {
    .whale-video,
    .fallback-animation {
        animation: none;
        transition: none;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 0 20px;
    }
    
    .header-content {
        padding: 25px 20px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .form-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .story-form {
        gap: 20px;
    }
    
    .submit-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .file-upload-area {
        padding: 25px 20px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 30px 25px;
        margin: 0 20px;
    }
    
    /* 移动端视频背景调整 */
    .video-background-container {
        display: none;
    }
    
    .fallback-animation {
        display: block;
        bottom: 20px;
        right: 20px;
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .form-container {
        padding: 25px 15px;
    }
    
    .form-input,
    .form-textarea {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .submit-button {
        padding: 14px 25px;
        font-size: 0.95rem;
    }
    
    .file-upload-area {
        padding: 20px 15px;
    }
}

/* 额外的科技感元素 */
.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.form-input:focus::placeholder,
.form-textarea:focus::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* 添加科技感动态光影效果 */
.form-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(66, 165, 245, 0.1), rgba(25, 118, 210, 0.1));
    border-radius: 25px;
    z-index: -1;
    animation: backgroundAnimation 20s ease infinite;
}

.header-content::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 15px;
    pointer-events: none;
}

/* 科技感脉冲动画 */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 165, 245, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(66, 165, 245, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 165, 245, 0); }
}

.submit-button {
    animation: pulse 2s infinite;
}