/**
 * Shared CSS - Common styles for all tools
 * Version 5.0 - Modern UI Redesign
 */

/* ===== CSS Variables ===== */
:root {
    --color-primary: #28a745;
    --color-primary-hover: #218838;
    --color-accent: #2962ff;
    --color-accent-hover: #0041f5;
    --color-text: #333;
    --color-text-secondary: #666;
    --color-text-muted: #888;
    --color-bg: #ffffff;
    --color-bg-section: #f7f7f7;
    --color-border: #e0e0e0;
    --color-step-1: #ffd000;
    --color-step-2: #ff9500;
    --color-step-3: #ff5b29;
    --color-step-4: #2962ff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    font-weight: 400;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 40px 60px;
    position: relative;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1 {
    text-align: center;
    color: var(--color-text);
    margin-bottom: 10px;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h1 .icon {
    display: none; /* Hide emoji icons */
}

h2 {
    font-size: 30px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 15px;
}

p {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* Subtitle under main title */
.page-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 40px;
    margin-top: 0;
}

/* ===== Language Selector ===== */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-btn {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.lang-btn .fa-globe {
    font-size: 14px;
}

.lang-btn .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.lang-btn:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.current-lang {
    font-weight: 500;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid var(--color-border);
}

.lang-menu::-webkit-scrollbar {
    width: 6px;
}

.lang-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--radius-md);
}

.lang-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: var(--radius-md);
}

.lang-menu::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--color-bg-section);
    font-size: 14px;
}

.lang-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lang-option:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.lang-option:hover {
    background: var(--color-bg-section);
}

.lang-option.active {
    background: #e8f4fd;
    color: var(--color-accent);
    font-weight: 600;
}

.lang-option .flag {
    font-size: 18px;
}

/* ===== Tool Navigation ===== */
.tool-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 0 40px 0;
    padding: 0;
    background: transparent;
    flex-wrap: wrap;
}

.tool-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tool-nav-item:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: #f8faff;
}

.tool-nav-item.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.tool-nav-item i {
    font-size: 14px;
}

/* ===== License Section ===== */
.license-section {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.license-section h3 {
    margin: 0;
    color: white;
}

.license-section .license-name {
    margin: 5px 0;
    font-size: 0.85em;
    opacity: 0.9;
}

.license-section .logout-link {
    margin: 5px 0;
}

.license-section .logout-link a {
    color: #ffd700;
    text-decoration: none;
}

/* ===== USPs Section ===== */
.usps {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.usps-table {
    border-collapse: collapse;
    margin: 0 auto;
}

.usps-table tr {
    height: 40px;
}

.usps-table td {
    font-size: 16px;
    color: #555;
    padding: 5px;
    vertical-align: middle;
}

.usps-table td.usp-icon {
    font-size: 20px;
    width: 40px;
    text-align: center;
    padding-right: 15px;
}

/* ===== Section Styles ===== */
section {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

section h2, section h3 {
    margin-bottom: 20px;
    text-align: center;
}

/* ===== Collapsible Sections ===== */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.collapsible-header:hover {
    color: #3498db;
}

.collapse-icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.collapsible-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ===== Tables ===== */
.how-it-works-table,
.why-use-table {
    border-collapse: collapse;
    margin: 20px auto;
    width: auto;
    max-width: 800px;
}

.how-it-works-table tr,
.why-use-table tr {
    height: 40px;
}

.how-it-works-table td,
.why-use-table td {
    font-size: 16px;
    color: #555;
    padding: 8px;
    vertical-align: top;
    text-align: left;
}

.how-it-works-table td.step-number {
    font-weight: bold;
    color: #555;
    width: 40px;
    text-align: right;
    padding-right: 15px;
}

.why-use-table td.checkmark {
    font-size: 20px;
    color: #2ecc71;
    font-weight: bold;
    width: 40px;
    text-align: center;
    padding-right: 15px;
}

/* ===== Buttons ===== */
.btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background-color: var(--color-primary);
    font-size: 16px;
    padding: 18px 50px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
    min-height: 56px;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

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

.btn-secondary:hover {
    background-color: var(--color-bg-section);
    border-color: var(--color-text-secondary);
}

.btn.btn-premium {
    background-color: var(--color-primary) !important;
    color: white;
    margin-left: 15px;
    text-decoration: none;
    display: inline-flex;
    font-size: 16px;
    padding: 18px 50px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
    line-height: 1.4;
    min-height: 56px;
}

.btn.btn-premium:hover {
    background-color: var(--color-primary-hover) !important;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

/* ===== Hero Upload Section ===== */
.hero-upload {
    text-align: center;
    padding: 60px 0;
    max-width: 600px;
    margin: 0 auto;
}

.hero-upload h1 {
    margin-bottom: 15px;
}

.hero-upload .page-subtitle {
    margin-bottom: 30px;
}

.hero-upload .btn-primary {
    margin-bottom: 15px;
}

.hero-upload .drop-hint {
    color: var(--color-text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-upload .drop-hint i {
    font-size: 16px;
}

/* ===== Drag & Drop Zone ===== */
.drop-zone {
    position: relative;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    text-align: center;
    background-color: transparent;
    transition: all 0.2s ease;
    margin: 0;
    cursor: pointer;
}

.drop-zone:hover .btn-primary {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

.drop-zone.drag-over {
    background-color: rgba(40, 167, 69, 0.05);
    border-radius: var(--radius-lg);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-zone-content h3 {
    display: none; /* Hidden in new design */
}

.drop-zone-content p {
    display: none; /* Hidden in new design */
}

.drop-icon {
    display: none; /* Hidden in new design */
}

.supported-formats {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 20px !important;
    padding-top: 0;
}

.drop-zone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.95);
    border-radius: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 9999;
}

.drop-zone.drag-over .drop-zone-overlay {
    display: flex;
}

.drop-zone-message {
    text-align: center;
}

.drop-zone-message i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.drop-zone-message h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

/* ===== File Info ===== */
.file-selected {
    display: flex;
    align-items: center;
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.file-selected i {
    color: #28a745;
    font-size: 1.5rem;
    margin-right: 10px;
}

.file-selected span {
    flex: 1;
    font-weight: bold;
    color: #333;
}

.clear-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Hide drop zone when file is selected */
.file-selected-state .drop-zone {
    display: none;
}

/* ===== Hidden Elements ===== */
.hidden {
    display: none;
}

#videoInput {
    display: none;
}

#fileInfo {
    display: none;
}

/* ===== Video Container ===== */
#videoContainer {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#videoPlayer {
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
}

/* ===== Loading Spinner ===== */
#loadingSpinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* ===== More Tools Section ===== */
.more-tools-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.more-tools-section h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: normal;
}

.tools-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 30px;
}

.tools-list a {
    color: #666;
    text-decoration: underline;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.tools-list a:hover {
    color: #007bff;
    text-decoration: underline;
}

/* ===== Feedback Section ===== */
.feedback-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 10px;
    color: #6c757d;
    font-size: 0.9em;
}

.feedback-description {
    margin-bottom: 10px;
}

.feedback-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.feedback-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.redeem-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.redeem-section a {
    font-size: 0.9em;
}

/* ===== Content Sections ===== */
.content-section {
    background: var(--color-bg-section);
    padding: 50px 40px;
    margin: 0 -60px;
    text-align: left;
}

.content-section.white-bg {
    background: white;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* ===== How It Works - Step Cards ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: left;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
}

.step-card:nth-child(1) .step-number { background: var(--color-step-1); }
.step-card:nth-child(2) .step-number { background: var(--color-step-2); }
.step-card:nth-child(3) .step-number { background: var(--color-step-3); }
.step-card:nth-child(4) .step-number { background: var(--color-step-4); }
.step-card:nth-child(5) .step-number { background: var(--color-primary); }

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text);
}

.step-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ===== Features Grid (Why Choose Us) ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    text-align: left;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg-section);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--color-accent);
    font-size: 20px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ===== FAQ Section ===== */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    background: white;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: white;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--color-bg-section);
}

.faq-question .faq-icon {
    font-size: 14px;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 20px 20px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* ===== Tools Pills (More Free Tools) ===== */
.tools-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tool-pill {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tool-pill:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: #f8faff;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--color-bg-section);
    padding: 30px 40px;
    margin: 50px -60px -40px -60px;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 20px;
        padding-top: 70px;
    }

    /* Typography mobile */
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    /* Language selector mobile */
    .language-selector {
        top: 15px;
        right: 15px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .lang-menu {
        max-height: 300px;
        min-width: 160px;
    }

    .lang-option {
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Tool navigation mobile */
    .tool-nav {
        gap: 8px;
        padding: 0;
        margin-bottom: 30px;
    }

    .tool-nav-item {
        padding: 8px 14px;
        font-size: 13px;
    }

    .tool-nav-item span {
        display: none;
    }

    .tool-nav-item i {
        font-size: 16px;
    }

    /* Hero mobile */
    .hero-upload {
        padding: 40px 0;
    }

    /* Buttons mobile */
    .btn {
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 30px;
    }

    .btn-primary {
        padding: 16px 40px;
    }

    .btn.btn-premium {
        font-size: 14px;
        padding: 14px 20px;
        white-space: normal;
        line-height: 1.4;
        margin-left: 0 !important;
        margin-top: 10px;
    }

    /* Content sections mobile */
    .content-section {
        padding: 40px 20px;
        margin: 0 -20px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* More tools mobile */
    .tools-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Footer mobile */
    .site-footer {
        padding: 25px 20px;
        margin: 40px -20px -20px -20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
