* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --accent: #22d3ee;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon {
    font-size: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area.drag-over {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    transform: scale(1.02);
}

.upload-area.upload-success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.upload-icon.success {
    color: var(--success);
}

.upload-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.upload-content p {
    color: var(--text-secondary);
}

.file-name {
    color: var(--accent);
    font-weight: 600;
}

.file-limit {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.upload-note {
    text-align: center;
    color: var(--success);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Player Section */
.player-section {
    margin-bottom: 2rem;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.player-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.player-controls {
    display: flex;
    gap: 0.5rem;
}

.video-container {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#videoPlayer {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
}

/* Info Panel */
.info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Actions */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

/* Status Message */
.status-message {
    position: fixed;
    top: 5rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.status-message.show {
    opacity: 1;
    transform: translateX(0);
}

.status-message.success {
    background: var(--success);
    color: white;
}

.status-message.error {
    background: var(--danger);
    color: white;
}

.status-message.info {
    background: var(--primary);
    color: white;
}

/* Content Section */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
}

.content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Related Tools */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.related-tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.related-tool-card .tool-icon {
    font-size: 1.5rem;
}

.tool-name {
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

/* Progress Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-main);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.progress-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem 3rem;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
        justify-content: center;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .status-message {
        right: 1rem;
        left: 1rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
}

/* Notice Section */
.notice-section {
    margin-bottom: 2rem;
}

.notice-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.notice-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.notice-card h2 {
    color: #92400e;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.notice-card p {
    color: #78350f;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Recommendation Section */
.recommendation-section {
    margin-bottom: 3rem;
}

.recommendation-card {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.recommendation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.recommendation-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0;
}

.badge-recommended {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* CapCut Showcase */
.capcut-showcase {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.capcut-info {
    text-align: center;
}

.capcut-logo {
    margin-bottom: 1rem;
}

.capcut-info h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.capcut-tagline {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.feature-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Buttons */
.cta-buttons {
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-large:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
}

.cta-note {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Why CapCut */
.why-capcut {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 2rem;
}

.why-capcut h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.why-capcut ul {
    list-style: none;
    padding: 0;
}

.why-capcut li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.why-capcut li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.why-capcut strong {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .recommendation-header h2 {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .btn-large {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}

/* Page Wrapper */
.page-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

/* Container */
.container {
    min-width: 0; /* Prevent grid overflow */
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.ad-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ad-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-content {
    background: var(--bg-main);
    border-radius: 8px;
    overflow: hidden;
}

.ad-placeholder {
    aspect-ratio: 300/250;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px dashed var(--border);
}

.ad-placeholder p {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 600;
}

.ad-card:last-of-type .ad-placeholder {
    aspect-ratio: 300/600;
}

/* Sidebar Card */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.sidebar-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Featured Card */
.sidebar-card.featured {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--primary);
    position: relative;
}

.featured-badge {
    position: absolute;
    top: -12px;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.75rem;
}

.sidebar-links li:last-child {
    margin-bottom: 0;
}

.sidebar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-links a:hover {
    background: var(--bg-main);
    color: var(--accent);
    transform: translateX(4px);
}

.sidebar-links a:before {
    content: "→";
    margin-right: 0.5rem;
    color: var(--accent);
}

/* Tips Card */
.tips-card {
    background: var(--bg-main);
}

.tip-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.tip-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tip-item strong {
    color: var(--accent);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.tip-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .ad-card:last-of-type {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
    }

    .sidebar {
        display: none;
    }
}
