/* WIA Video - Modern Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00bcd4;
    --secondary-color: #0097a7;
    --accent-color: #ff4081;
    --dark-bg: #1a1a2e;
    --light-bg: #f5f5f5;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
    width: auto;
}

.brand-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.brand-text p {
    font-size: 0.9rem;
    color: #666;
}

.language-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    background: white;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: var(--primary-color);
    color: white;
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.main-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.2rem;
    color: #666;
}

/* Download Form */
.download-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
}

.url-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.url-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.button-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 188, 212, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Results */
#results {
    margin-top: 2rem;
}

.result-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.quality-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quality-btn {
    padding: 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quality-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Supported Platforms */
.platforms {
    margin-top: 3rem;
    text-align: center;
}

.platforms h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.platform-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.platform-tag {
    padding: 0.5rem 1.5rem;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: white;
    margin-top: 3rem;
}

.footer p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Loading Spinner */
.spinner {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

.loading .spinner {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .main-card {
        padding: 2rem 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
}

/* ========== 다크 모드 지원 ========== */
:root {
    --bg-gradient-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

[data-theme="dark"] {
    --primary-color: #00bcd4;
    --secondary-color: #0097a7;
    --accent-color: #ff4081;
    --dark-bg: #0f0f0f;
    --light-bg: #1a1a1a;
    --text-dark: #e0e0e0;
    --text-light: #ffffff;
    --card-bg: #1f1f1f;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.7);
}

[data-theme="dark"] body {
    background: var(--bg-gradient-dark);
    color: var(--text-dark);
}

[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.95);
}

[data-theme="dark"] .main-card {
    background: var(--card-bg);
}

[data-theme="dark"] .url-input {
    background: #2a2a2a;
    color: var(--text-dark);
    border: 1px solid #3a3a3a;
}

[data-theme="dark"] .platform-icon {
    background: #2a2a2a;
}

/* 다크 모드 토글 버튼 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-toggle span {
    font-size: 24px;
    transition: all 0.3s ease;
}

/* ========== 다운로드 진행률 표시 ========== */
.download-progress {
    display: none;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

[data-theme="dark"] .download-progress {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 15px;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: #666;
}

[data-theme="dark"] .progress-info {
    color: #b0b0b0;
}

.download-speed {
    font-size: 14px;
}

.download-eta {
    font-size: 14px;
}

/* 애니메이션 효과 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.downloading {
    animation: pulse 2s infinite;
}

/* 스켈레톤 로더 */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 성공 애니메이션 */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark svg {
    width: 100%;
    height: 100%;
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.checkmark-circle {
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    animation: checkmark 0.6s ease-in-out;
}

/* 플로팅 다운로드 버튼 */
.floating-download {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-download:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.floating-download svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* 품질 버튼 스타일 개선 */
.quality-btn-video-only {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.quality-btn-video-only:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.5);
}

/* 진행률 표시가 실제로 보이도록 수정 */
.download-progress {
    display: block !important;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Platform Icons Styling */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-width: 100px;
}

.platform-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.platform-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.platform-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .platform-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .platform-item {
        padding: 0.75rem;
    }
    
    .platform-icon {
        width: 40px;
        height: 40px;
    }
    
    .platform-name {
        font-size: 0.8rem;
    }
}

/* Quality Selection Grid - 4x2 = 8개 */
.quality-options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

/* Audio + Video Button (주황색) */
.quality-btn-audio-video {
    padding: 1rem;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}

.quality-btn-audio-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #f57c00, #e65100);
}

/* Video Only Button (하늘색) */
.quality-btn-video-only {
    padding: 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}

.quality-btn-video-only:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.3);
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
    .quality-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Quality Label */
.quality-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.quality-label.sound-video {
    background: #4caf50;
    color: white;
}

.quality-btn-video-only .quality-label {
    background: #e3f2fd;
    color: #1976d2;
}

.quality-text {
    font-weight: 600;
}


.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .header-menu {
        margin-top: 0.5rem;
    }
    
    .blog-link {
        font-size: 0.875rem;
        padding: 0.4rem 1rem;
    }
}

/* WIA Family Navigation */
.wia-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wia-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wia-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 각 서비스별 색상 */
.wia-go {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.wia-tools {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.wia-trip {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.wia-blog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 호버 효과 강화 */
.wia-go:hover {
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.wia-tools:hover {
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

.wia-trip:hover {
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.4);
}

.wia-blog:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 반응형 */
@media (max-width: 768px) {
    .wia-nav {
        justify-content: center;
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    .wia-nav-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .wia-nav {
        flex-direction: row;
        width: 100%;
    }
    
    .wia-nav-btn {
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}
