/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --secondary-color: #6B7280;
    --success-color: #0F9D58;
    --background: #FFFFFF;
    --surface: #F9FAFB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

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

/* ==================== HEADER ==================== */
.header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== BUTTONS ==================== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

.btn-copy.copied {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== SECTIONS ==================== */
.tools-section,
.autoresizer-highlight,
.benefits-section,
.tool-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
}

.page-header {
    background: var(--surface);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* ==================== CARDS ==================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

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

.tool-card-featured {
    border: 2px solid var(--primary-color);
}

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

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ==================== AUTORESIZER HIGHLIGHT ==================== */
.autoresizer-highlight {
    background: var(--surface);
}

.highlight-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.highlight-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.highlight-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto 0.5rem;
}

.step-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.process-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* ==================== BENEFITS ==================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.benefit-card p {
    color: var(--text-secondary);
}

/* ==================== FORMS ==================== */
.tool-workspace {
    max-width: 900px;
    margin: 0 auto;
}

.form-card,
.result-card,
.info-card,
.upload-card,
.processing-card,
.player-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.vast-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.vast-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== RESULT CARD ==================== */
.result-output {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    word-break: break-all;
}

.result-output code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.notification {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

/* ==================== MACROS TABLE ==================== */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.macros-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.macro-platform-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.platform-name {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.macros-table table {
    width: 100%;
    border-collapse: collapse;
}

.macros-table th,
.macros-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.macros-table th {
    background: var(--surface);
    font-weight: 600;
}

.macro-value {
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* ==================== RESIZES ==================== */
.resizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.resize-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.resize-visual {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: white;
}

.resize-dimensions {
    font-size: 1.5rem;
    font-weight: 700;
}

.resize-info {
    padding: 1.5rem;
}

.resize-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.resize-size {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resize-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== UPLOAD ZONE ==================== */
.upload-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--surface);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-hint {
    display: block;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.warning-box {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* ==================== PROCESSING ==================== */
.processing-card {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.expiry-notice {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--surface);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== INFO CARD ==================== */
.info-card h3,
.info-card h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.info-card h3 {
    font-size: 1.5rem;
}

.info-card h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.info-card ul,
.info-card ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-card li {
    margin-bottom: 0.5rem;
}

.tip-box {
    background: #DBEAFE;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
}

.code-example {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ==================== VIDEO PLAYER ==================== */
.video-container {
    margin: 1rem 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.vast-info {
    background: var(--surface);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.vast-info h4 {
    margin-bottom: 0.5rem;
}

.vast-info p {
    margin-bottom: 0.5rem;
    word-break: break-all;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-disclaimer {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .highlight-content {
        grid-template-columns: 1fr;
    }

    .process-flow {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
    }

    .result-actions {
        flex-direction: column;
    }

    .macros-table {
        overflow-x: auto;
    }
}
