/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f7fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #e53e3e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #e53e3e;
}

.language-selector {
    margin-left: 20px;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    min-width: 160px;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #e53e3e;
    transform: translateY(-1px);
}

.language-selector select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3);
}

.language-selector option {
    background: #2d3748;
    color: white;
    padding: 8px;
}

/* Hero Section */
.hero {
    background: white;
    padding: 60px 0;
    border-bottom: 1px solid #e9ecef;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.play-icon {
    width: 40px;
    height: 40px;
    background: #4285f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.tagline {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

.hero h2 {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.search-container input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 16px;
    background: transparent;
}

.search-container input::placeholder {
    color: #999;
}

.search-container button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 16px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 100px;
}

.search-container button:hover {
    background: #3367d6;
}

.search-container button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.search-help {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

/* Loading */
.loading {
    padding: 48px 0;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #e53e3e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

/* Results */
.results {
    padding: 48px 0;
}

.results h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 32px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.thumbnail-container {
    position: relative;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.duration-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-info {
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.video-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.video-channel {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-channel::before {
    content: "👤";
    font-size: 12px;
}



.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.download-buttons button {
    padding: 14px 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.download-buttons button:hover::before {
    left: 100%;
}

.watch-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.watch-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.mp4-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.mp4-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
}

.mp3-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.mp3-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

@media (max-width: 480px) {
    .download-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .download-buttons button {
        font-size: 14px;
        padding: 14px;
    }
}

/* Advertisement Section */
.ad-section {
    padding: 40px 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.ad-banner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.ad-content {
    background: white;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 60px 20px;
    margin-bottom: 12px;
}

.ad-placeholder {
    font-size: 18px;
    font-weight: 500;
    color: #999;
    margin-bottom: 8px;
}

.ad-size {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 4px;
}

.ad-note {
    font-size: 12px;
    color: #ccc;
}

.ad-label {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* How to Use Section */
.how-to-use {
    padding: 60px 0;
    background: white;
}

/* Legal Notice */
.legal-notice {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notice-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.notice-text {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.notice-text a {
    color: #ff4757;
    text-decoration: none;
    font-weight: 600;
}

.notice-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-notice {
        margin: 20px 15px;
        padding: 12px 15px;
    }
    
    .notice-content {
        flex-direction: column;
        gap: 5px;
    }
    
    .notice-text {
        font-size: 13px;
    }
}

.how-to-use h3 {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    color: #333;
    margin-bottom: 48px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-image {
    margin-bottom: 20px;
}

.tutorial-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutorial-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-number {
    width: 48px;
    height: 48px;
    background: #4285f4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin: 0 auto 20px;
}

.step h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.step p {
    color: #666;
    line-height: 1.5;
}

/* Features */
.features {
    padding: 60px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 32px 20px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 28px;
    color: white;
}

.download-icon {
    background: linear-gradient(135deg, #4285f4, #34a853);
}

.mobile-icon {
    background: linear-gradient(135deg, #ea4335, #fbbc05);
}

.secure-icon {
    background: linear-gradient(135deg, #34a853, #137333);
}

.feature h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* Article Section */
.article-section {
    background: #f8f9fa;
    padding: 60px 0;
    margin-top: 50px;
}

.main-article {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.main-article h2 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #ff4757;
    padding-bottom: 15px;
}

.main-article h3 {
    color: #444;
    font-size: 1.4em;
    margin: 30px 0 15px;
    border-left: 4px solid #ff4757;
    padding-left: 15px;
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
    font-size: 16px;
}

.article-content a {
    color: #ff4757;
    text-decoration: none;
    font-weight: 500;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content strong {
    color: #333;
    font-weight: 600;
}

/* FAQ Section */
.faq-section {
    background: #fff;
    padding: 60px 0;
}

.faq-section h2 {
    text-align: center;
    color: #333;
    font-size: 2.2em;
    margin-bottom: 50px;
    position: relative;
}

.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ff4757;
    border-radius: 2px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 20px 25px;
    background: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question h3 {
    margin: 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5em;
    color: #ff4757;
    font-weight: bold;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.faq-item.active .faq-answer {
    padding: 20px 25px;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 15px;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.footer-section h5,
.footer-section h6 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-section p {
    color: #a0aec0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #e53e3e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
}

.social-link:hover {
    background: #c53030;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 24px;
    text-align: center;
    color: #a0aec0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-header {
    margin-bottom: 24px;
}

.processing-icon {
    font-size: 64px;
    animation: spin 2s linear infinite;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.modal-header p {
    color: #718096;
}

.video-title {
    font-size: 14px;
    color: #a0aec0;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-space {
    background: #f7fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 32px;
    margin: 24px 0;
}

.ad-placeholder {
    color: #a0aec0;
}

.ad-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.ad-placeholder p {
    font-weight: 500;
    margin-bottom: 4px;
}

.ad-placeholder small {
    display: block;
    font-size: 12px;
}

.timer-section {
    margin: 24px 0;
}

.countdown {
    font-size: 48px;
    font-weight: 700;
    color: #e53e3e;
    margin-bottom: 8px;
}

.download-btn {
    width: 100%;
    background: #38a169;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    margin-bottom: 16px;
}

.download-btn:hover {
    background: #2f855a;
}

.cancel-btn {
    background: transparent;
    color: #718096;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s;
}

.cancel-btn:hover {
    color: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .language-selector {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .language-selector select {
        min-width: 140px;
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 8px;
        border-radius: 12px;
        padding: 16px;
    }
    
    .search-container input {
        border-radius: 8px;
    }
    
    .search-container button {
        border-radius: 8px;
        justify-content: center;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Error States */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    margin: 24px 0;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 48px 0;
    color: #718096;
}

.no-results h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #2d3748;
}