:root {
    --bg-color: #080d15;
    --card-bg: rgba(20, 30, 45, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-uz: #00b4d8;
    --accent-pt: #e63946;
    --glow-uz: rgba(0, 180, 216, 0.5);
    --glow-pt: rgba(230, 57, 70, 0.5);
    --gradient-primary: linear-gradient(135deg, #00b4d8, #e63946);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background animated lights */
.stadium-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.light {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}

.light-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-uz);
    top: -100px;
    left: -100px;
}

.light-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-pt);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.light-3 {
    width: 250px;
    height: 250px;
    background: #00ff87;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 8s infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(50px) translateX(50px); }
}

@keyframes pulse {
    0% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.2); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Typography & Header */
.text-center { text-align: center; }

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.team-uz { color: var(--accent-uz); text-shadow: 0 0 10px var(--glow-uz); }
.team-pt { color: var(--accent-pt); text-shadow: 0 0 10px var(--glow-pt); }
.vs { color: var(--text-secondary); font-size: 1.5rem; font-weight: 400; }

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.form-group h2, .voting-section h3, .fun-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.8rem;
}

/* Voting Section */
.voting-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vote-btn {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vote-btn.voted-uz { background: var(--accent-uz); border-color: var(--accent-uz); }
.vote-btn.voted-pt { background: var(--accent-pt); border-color: var(--accent-pt); }

.vote-results {
    margin-top: 1rem;
}

.vote-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    display: flex;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.vote-bar { height: 100%; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.uz-bar { background: var(--accent-uz); width: 50%; }
.pt-bar { background: var(--accent-pt); width: 50%; }

.vote-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Score Container */
.score-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.team-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-flag { font-size: 2.5rem; }

.score-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid var(--glass-border);
}

.score-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.score-btn:hover { color: white; background: rgba(255, 255, 255, 0.1); }
.score-btn:active { transform: scale(0.9); }

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
    min-width: 40px;
    text-align: center;
}

.score-divider {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-secondary);
}

/* Radio Cards Grid */
.grid-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.radio-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.radio-card.selected {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.result-options { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.result-card { padding: 1.5rem 1rem; font-size: 1.1rem; }

.result-card[data-value="Uzbekistan wins"].selected { border-color: var(--accent-uz); box-shadow: 0 0 20px var(--glow-uz); background: rgba(0, 180, 216, 0.2); }
.result-card[data-value="Portugal wins"].selected { border-color: var(--accent-pt); box-shadow: 0 0 20px var(--glow-pt); background: rgba(230, 57, 70, 0.2); }
.result-card[data-value="Draw"].selected { border-color: #00ff87; box-shadow: 0 0 20px rgba(0, 255, 135, 0.3); background: rgba(0, 255, 135, 0.1); }

/* Buttons */
.generate-btn, .download-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn::after, .download-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.generate-btn:hover::after, .download-btn:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

.generate-btn:hover, .download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

.generate-btn:active, .download-btn:active {
    transform: translateY(1px);
}

.download-btn {
    background: linear-gradient(135deg, #2b5876, #4e4376);
    margin-top: 1rem;
}

/* Prediction Card Wrapper */
.hidden { display: none !important; }

.result-section {
    animation: fadeInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.prediction-card-wrapper {
    position: relative;
    padding: 3px;
    border-radius: 23px;
    background: linear-gradient(90deg, #00b4d8, #e63946, #00ff87, #00b4d8);
    background-size: 300% 300%;
    animation: gradientBorder 4s ease infinite;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.prediction-card {
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 50 L100 50 M50 0 L50 100 M20 20 L80 80 M20 80 L80 20" stroke="rgba(255,255,255,0.03)" stroke-width="2"/></svg>'), rgba(15, 23, 36, 0.95);
    background-size: 50px 50px, cover;
    text-align: center;
    border: none;
    border-radius: 20px;
}

.card-header, .card-footer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.6;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0;
    background: -webkit-linear-gradient(45deg, #fff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-score {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

#res-score {
    margin: 0 1rem;
    font-size: 2.2rem;
    color: #00ff87;
    text-shadow: 0 0 10px rgba(0, 255, 135, 0.4);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.card-details p {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.card-details span { color: var(--text-secondary); }

/* Fun Section */
.fun-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#confidence-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

.football-fact p {
    font-style: italic;
    color: #e2e8f0;
    line-height: 1.5;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--accent-uz);
    border-radius: 4px 8px 8px 4px;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    padding-top: 1rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .title { font-size: 1.8rem; flex-direction: column; gap: 0.5rem; }
    .score-container { flex-direction: column; gap: 1rem; }
    .score-divider { transform: rotate(90deg); margin: -0.5rem 0; }
    .card-details p { flex-direction: column; text-align: left; gap: 0.3rem; }
    .card-score { font-size: 1.4rem; }
    #res-score { font-size: 1.8rem; }
}
