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

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    background-color: #ffffff;
    color: #333;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.navbar-brand h1::before {
    content: "🎬";
    font-size: 1.8rem;
}

.navbar-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav li {
    margin-left: 2rem;
}

.navbar-nav a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: #3498db;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 100%;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    animation: fadeIn 1s ease-in;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,100 L100,100 L100,0 L0,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.3);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    box-shadow: 0 4px 14px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-danger {
    background-color: #e74c3c;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background-color: #c0392b;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background-color: #2ecc71;
    box-shadow: 0 4px 14px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    background-color: #27ae60;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.btn-disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-disabled:hover {
    background-color: #bdc3c7;
    transform: none;
    box-shadow: none;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #8e44ad);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title::before {
    content: "📹";
    font-size: 1.8rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #34495e;
    font-size: 0.95rem;
}

.form-control, .form-group input[type="email"], .form-group input[type="datetime-local"], .form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus, .form-group input[type="email"]:focus, .form-group input[type="datetime-local"]:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

/* 发送方式选择器样式 */
.send-type-selector {
    display: flex;
    gap: 1.5rem;
}

.send-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
}

.send-type-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* 视频录制区域样式 */
#video-record {
    padding: 1.5rem;
}

.record-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.record-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    min-width: 80px;
    text-align: center;
}

#video-record .btn {
    min-width: 120px;
}

.form-control:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    padding: 1rem;
}

/* 视频上传区域 */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #3498db;
    background-color: #f0f8ff;
    transform: translateY(-2px);
}

.upload-area.active {
    border-color: #3498db;
    background-color: #e3f2fd;
    border-style: solid;
}

.upload-icon {
    font-size: 4rem;
    color: #95a5a6;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
}

.upload-text {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.95rem;
    color: #95a5a6;
    max-width: 500px;
    margin: 0 auto;
}

/* 视频录制区域 */
.record-area {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16/9;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoPreview,
#recordingPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* 视频容器样式 */
.video-container,
.video-preview-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 视频元素样式统一 */
.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频元素样式 */
#videoPreview,
#recordingPreview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 录制预览视频样式，确保有播放控制和进度条 */
#recording-video {
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 确保浏览器默认的视频控制器正常显示 */
#recording-video::-webkit-media-controls {
    display: flex;
    opacity: 1;
    transition: opacity 0.3s;
}

#recording-video:hover::-webkit-media-controls {
    opacity: 1;
}

/* 音频可视化器样式 */
.audio-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding: 0 20px;
    z-index: 5;
}

.audio-bar {
    width: 4px;
    height: 0px;
    background-color: #4CAF50;
    border-radius: 2px;
    transition: height 0.1s ease, background-color 0.1s ease;
}

/* 录制计时器样式 */
.recording-timer {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(231, 76, 60, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* 音频波纹样式 - 用于真实音频可视化 */
.audio-visualizer {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 50px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.audio-bar {
    width: 4px;
    height: 5px; /* 初始高度，JavaScript会动态更新 */
    background-color: #4CAF50;
    border-radius: 2px;
    transition: height 0.05s ease, background-color 0.1s ease;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.8);
}

@keyframes audioPulse {
    0%, 100% {
        height: 5px;
          background-color: #3498db;
      }
      
      50% {
        height: 25px;
        background-color: #2ecc71;
    }
}

#videoPreview,
#recordingPreview {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: none;
    object-fit: contain;
}

.recording-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.recording-status.active {
    display: flex;
    animation: pulse 1.5s infinite;
}

.recording-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.recording-time {
    font-weight: 600;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 0.85rem;
}

.record-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.record-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background-color: #e74c3c;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.4);
}

.record-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.record-btn.recording {
    background-color: #e74c3c;
    animation: pulse 1.5s infinite;
}

.record-btn i {
    font-size: 1.5rem;
}

.record-btn svg {
    width: 28px;
    height: 28px;
}

/* 发送方式选择 */
.send-type-selector {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.send-type-option {
    flex: 1;
    padding: 2rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background-color: #fff;
}

.send-type-option:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.1);
}

.send-type-option.active {
    border-color: #3498db;
    background-color: #e3f2fd;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.15);
}

.send-type-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.send-type-option:hover .send-type-icon {
    transform: scale(1.1);
}

.send-type-label {
    font-weight: 600;
    color: #34495e;
    font-size: 1.1rem;
}

/* 上传进度 */
.progress-container {
    display: none;
    margin-top: 1.5rem;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.progress-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-status {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

/* 缓冲动画 */
.loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #95a5a6;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #7f8c8d;
    background-color: #f0f0f0;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 成功提示 */
.success-icon {
    font-size: 4rem;
    color: #2ecc71;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s ease;
}

.success-message {
    text-align: center;
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.success-details {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
    margin-top: 1rem;
}

.success-details p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #555;
}

/* 标签样式 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tag {
    background-color: #3498db;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.tag i {
    margin-left: 0.5rem;
    cursor: pointer;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* 布局工具类 */
.d-flex {
    display: flex;
    gap: 0.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.border {
    border: 1px solid #ddd;
}

.rounded {
    border-radius: 5px;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray-600 {
    color: #666;
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        margin-top: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-links li {
        margin: 0 0.8rem;
    }
    
    .hero {
        padding: 4rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .card {
        padding: 1.75rem 1.25rem;
    }
    
    .send-type-selector {
        flex-direction: column;
        gap: 1rem;
    }
    
    .send-type-option {
        padding: 1.5rem 1rem;
    }
    
    .upload-area {
        padding: 3rem 1.5rem;
    }
    
    .record-controls {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .record-btn {
        width: 60px;
        height: 60px;
    }
    
    .modal-content {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
        width: calc(100% - 2rem);
    }
    
    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .record-area {
        min-height: 220px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}