/* ==========================================================================
   Versus Highlights - Modern Unified Stylesheet (style.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- 1. Global Variables & Base Resets --- */
:root {
    --bg-main: #0b0f19;
    --bg-card: #151f32;
    --bg-card-hover: #1e2942;
    --border-color: #24324d;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Brand Theme Accents */
    --accent-primary: #6366f1; /* Indigo */
    --accent-primary-hover: #4f46e5;
    
    /* Game theme accents */
    --color-sf6: #eab308;     /* Amber/Gold */
    --color-2xko: #84cc16;    /* Lime */
    --color-strive: #ef4444;  /* Red */
    --color-tekken: #dc2626;  /* Crimson */
    
    /* UI Accent States */
    --success: #10b981;
    --success-hover: #059669;
    --secondary-btn: #334155;
    --secondary-btn-hover: #475569;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- 2. Navbar Component (Fluid Navigation) --- */
.app-navbar {
    height: 70px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.brand-versus {
    color: var(--text-primary);
}

.brand-highlights {
    color: var(--accent-primary);
    margin-left: 6px;
}

/* --- 3. Home Page (home.html) --- */
.home-wrapper {
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.home-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.home-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    justify-content: center;
}

.home-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.3);
    background-color: var(--bg-card-hover);
}

.home-card:hover::before {
    opacity: 1;
}

.game-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-card:hover .game-logo {
    transform: scale(1.05);
}

/* --- 4. Form Pages (sf6.html, strive.html, tekken8.html, 2xko.html) --- */
.main-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin: 40px auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    max-width: 900px;
}

.header-title {
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.player-card {
    border-radius: 10px;
    padding: 30px;
    color: var(--text-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Game accent theme card styling */
.player-card.sf6-theme {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(234, 179, 8, 0.05) 100%);
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.player-card.twoxko-theme {
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.2) 0%, rgba(132, 204, 22, 0.05) 100%);
    border: 1px solid rgba(132, 204, 22, 0.3);
}
.player-card.strive-theme {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.player-card.tekken8-theme {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.player-card.player-2 {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
    border: 1px solid var(--border-color);
}

.player-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.player-label {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Custom styled Form Inputs to fit dark slate theme */
.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
    outline: none !important;
}

.input-group-text {
    background-color: var(--border-color) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* Tournament Info Sections */
.tournament-section {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 25px !important;
    margin-top: 30px !important;
}

.tournament-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.tournament-section label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Symmetrical Buttons System */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
    border: none;
    color: #fff !important;
    padding: 14px 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--secondary-btn) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--secondary-btn-hover) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* --- 5. Result Pages (sf6_resultado.html, etc.) --- */
.result-container {
    max-width: 1400px;
    margin: 40px auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.result-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.thumbnails-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Modern Glassmorphic Controls Panel */
.controls-panel {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 30px !important;
    color: var(--text-primary) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.controls-panel h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.controls-panel h4 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.controls-panel h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 12px;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.character-adjust-block {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

/* Player Column Accents in Results */
.player-col-p1 {
    color: #3b82f6 !important; /* Accent color p1 */
}

.player-col-p2 {
    color: #ef4444 !important; /* Accent color p2 */
}

.controls-panel p.text-muted {
    color: var(--text-secondary) !important;
}

.controls-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.player-control-col {
    flex: 1;
    min-width: 300px;
}

.player-control-col-p2 {
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.offset-controls-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.offset-control-col {
    flex: 1;
}

.player-label-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.ui-customization-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* --- Modern Image Modification Components --- */

/* Sleek Sliders styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #818cf8;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #818cf8;
}

/* Updated Numeric Input styling */
.number-input {
    width: 70px;
    padding: 6px 8px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: var(--text-primary) !important;
    text-align: center;
    margin-left: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.number-input:focus {
    border-color: var(--accent-primary) !important;
    outline: none;
}

/* Premium Custom Switch Component */
.custom-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.custom-switch input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 24px;
    background-color: #334155;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background-color 0.3s;
    border: 1px solid var(--border-color);
}

.custom-switch input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #f8fafc;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-switch input[type="checkbox"]:checked {
    background-color: var(--success);
    border-color: var(--success);
}

.custom-switch input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

.custom-switch .small {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Color inputs inside UI customization */
input[type="color"] {
    -webkit-appearance: none;
    border: 1px solid var(--border-color) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border-radius: 6px !important;
    padding: 2px !important;
    height: 42px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* --- Thumbnail Container & Download Options --- */
.thumbnail-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 850px;
    margin: 40px auto 0;
    background-color: #020617;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

.thumbnail-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
}

.download-section {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Unified download buttons */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-hover) 100%);
    color: #fff !important;
    padding: 14px 35px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
    filter: brightness(1.1);
}

.download-btn.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-btn) 0%, var(--secondary-btn-hover) 100%);
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.3);
}

.download-btn.btn-secondary:hover {
    box-shadow: 0 8px 20px rgba(51, 65, 85, 0.5);
}

/* --- 6. Media Queries --- */
@media (max-width: 900px) {
    .home-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .result-container, .main-container {
        padding: 24px;
        margin: 20px 10px;
    }
    .player-control-col-p2 {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 20px;
        margin-top: 10px;
    }
    .download-section {
        flex-direction: column;
        gap: 12px;
    }
    .download-btn {
        width: 100%;
    }
}

/* --- 7. Footer Component --- */
.app-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 20px 40px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

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

.paypal-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #003087 0%, #0079C1 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 121, 193, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.paypal-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 121, 193, 0.4);
    filter: brightness(1.1);
}

.paypal-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (max-width: 600px) {
    .app-footer {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}
