:root {
    /* Meta-Style Palette */
    --primary-bg: #F0F2F5;
    /* Light Grey Background */
    --card-bg: #FFFFFF;
    /* Pure White Cards */
    --text-main: #050505;
    /* Deep Black */
    --text-muted: #65676B;
    /* Meta Grey */
    --accent-blue: #0064E0;
    /* Meta Blue */
    --accent-blue-hover: #1877F2;
    --accent-like: #0064E0;
    /* Green replaced by Blue for "Yes/Like" to match request or keep green? User said "White, Black, Blue". Let's stick to Blue for primary actions. If Yes/No needs distinction, we might need green/red but let's try a strict style first. Actually, for Tinder mechanisms, Green/Red is intuitive. But user asked for "White, Black, Blue". Let's make "Like" Blue and "Nope" Red/Grey. */
    /* Wait, standard is Green/Red. Let's make "Like" the Primary Blue and "Nope" a Red or Dark Grey. Meta uses Blue for primary interaction. Let's use Blue for "Yes" to fit the theme heavily. */
    --accent-nope: #E41E3F;

    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12);
    --font-main: 'Outfit', sans-serif;
    --border-radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dynamic Background - Subtle Blue Gradients */
.background-globes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(0, 100, 224, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 100, 224, 0.05) 0%, transparent 40%);
}

/* Removed heavy blurry globes for a cleaner look */
.globe {
    display: none;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    min-height: -webkit-fill-available;
    transition: max-width 0.3s ease;
}

/* Custom Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* Intro Screen */
#intro-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 60px 20px 40px;
    text-align: center;
    background: var(--primary-bg);
    /* Opaque for clean start */
    transition: opacity 0.5s ease;
}

#intro-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#intro-screen h1 {
    font-size: 3.5rem;
    /* Large and bold */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
    /* Black */
    letter-spacing: -1px;
}

#intro-screen p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 320px;
    line-height: 1.5;
}

.primary-btn {
    padding: 16px 40px;
    background: var(--accent-blue);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 100, 224, 0.3);
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-btn:active {
    transform: scale(0.96);
    background: var(--accent-blue-hover);
}

#intro-screen footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-bottom: 10px;
    /* Ensure safe area */
}

#intro-screen footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

#intro-screen footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Header */
#game-header {
    text-align: center;
    margin-bottom: 20px;
    z-index: 10;
    transition: opacity 0.5s;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Card Stack */
#card-stack {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    max-height: 520px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid #E4E6EB;
    /* Subtle stroke */
    transition: transform 0.1s ease-out;
    cursor: grab;
    user-select: none;
    transform-origin: 50% 100%;
}

.card:active {
    cursor: grabbing;
}

.card h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.4;
    font-weight: 600;
}

.card .icon {
    font-size: 5rem;
    margin-bottom: 40px;
    color: var(--accent-blue);
    /* Soft shadow for icon pop */
    filter: drop-shadow(0 4px 4px rgba(0, 100, 224, 0.2));
}

/* Status Indicators */
.card-status {
    position: absolute;
    top: 40px;
    padding: 8px 16px;
    border: 3px solid;
    border-radius: 8px;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0;
    transform: rotate(-15deg);
    background: rgba(255, 255, 255, 0.8);
}

.status-nope {
    right: 40px;
    color: var(--accent-nope);
    border-color: var(--accent-nope);
    transform: rotate(15deg);
}

.status-like {
    left: 40px;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: rotate(-15deg);
}

/* Controls */
.controls {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    z-index: 10;
}

.control-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-elevated);
}

.control-btn.nope {
    color: var(--accent-nope);
}

.control-btn.like {
    color: var(--accent-blue);
    /* Blue for Like */
}

/* Result Screen */
#result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 100vh;
    height: 100%;
    background: var(--primary-bg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.5s ease;
    /* Hide scrollbar mobile */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#result-screen::-webkit-scrollbar {
    display: none;
}

.result-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 0;
    text-align: center;
}

.result-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--accent-blue);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    width: 100%;
    /* Ensure container takes width but items don't stretch */
}

.keyword-tag {
    background: #EBF5FF;
    color: var(--accent-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 100, 224, 0.2);
    flex-grow: 0;
    /* Prevent stretching */
    width: auto;
}

.result-content>p {
    color: var(--text-main);
    /* High Contrast */
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1.15rem;
    /* Larger for reading */
    text-align: justify;
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
}

.courses-section {
    text-align: left;
    margin-top: 10px;
}

.courses-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.course-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-item {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #E4E6EB;
}

.course-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--accent-blue);
}

.course-icon {
    width: 48px;
    height: 48px;
    background: #EBF5FF;
    /* Light Blue BG */
    color: var(--accent-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.course-info h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text-main);
}

.course-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* #btn-restart uses .primary-btn class now */
#btn-restart {
    margin-top: 40px;
    /* Maintain spacing */
    width: 100%;
    max-width: 300px;
    justify-self: center;
    /* Center in grid if needed */
}

#instruction-overlay {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
    animation: pulse 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    color: var(--text-muted);
}

.hand-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

@media (max-height: 700px) {
    .app-container {
        justify-content: flex-start;
        padding-top: 10px;
    }

    #card-stack {
        flex: initial;
        height: 420px;
        margin-top: 10px;
    }
}

@media (max-width: 380px) {
    #intro-screen h1 {
        font-size: 2.8rem;
    }

    .card h3 {
        font-size: 1.4rem;
    }
}

/* Desktop Responsiveness - Unified Vertical Layout */
@media (min-width: 768px) {
    .app-container {
        max-width: 960px;
    }

    #card-stack {
        max-width: 440px;
        margin: 0 auto;
    }

    .controls {
        width: 100%;
        max-width: 440px;
        justify-content: center;
    }

    /* 
       Unified Single Page Vertical Layout
       - Keeps the "Mobile App" feel but centered.
       - Track (Courses) strictly below Description.
    */
    .result-content {
        max-width: 550px;
        /* Wider than mobile (480px) but focused to avoid eye strain */
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center items */
        padding-top: 40px;
        gap: 24px;
    }

    .result-content h2 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
    }

    .result-content>div:first-of-type {
        /* This was the wrapper for left column in split view, checks if it exists in HTML structure. 
           In HTML we have: h2, p, div.courses-section, btn. 
           Wait, there is NO wrapper div in HTML around p and btn. 
           The split view CSS implied one might be needed or targeted children via grid-row. 
           Since we are going vertical, we don't need complex selectors.
        */
        display: contents;
        /* Remove any flex/grid behavior if it was targeted */
    }

    #career-description {
        font-size: 1.2rem;
        text-align: justify;
        width: 100%;
        margin-bottom: 0;
    }

    .keywords-container {
        /* Keywords removed, but keeping style just in case logic acts up */
        display: none;
    }

    .courses-section {
        width: 100%;
        margin-top: 0;
    }

    /* 2 Columns for 6 items on Desktop */
    .course-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    #btn-restart {
        width: auto;
        max-width: none;
        margin-top: 40px;
    }
}

/* Share Buttons */
.share-buttons {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.share-buttons p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    background: none !important;
    /* Override result p style */
    box-shadow: none !important;
    padding: 0 !important;
}

.buttons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.whatsapp {
    background: #25D366;
}
/* Download Button Visibility */
.share-btn.download {
    background: #343a40; /* Dark Grey */
    color: #fff;
}

.share-btn.download:hover {
    background: #212529;
    transform: translateY(-2px) scale(1.05);
}

/* Special Course - Vaca Roxa Style */
.course-item.special-feature {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.4);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.course-item.special-feature:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(74, 0, 224, 0.6);
}

/* Shine Effect */
.course-item.special-feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

