/* World Cup Prediction Game Styles */

.predworldcup-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-width: 0;
}

.predworldcup-hero {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.1) 0%, rgba(255, 0, 255, 0.05) 100%);
    text-align: center;
    padding: 4rem 1rem !important;
    border-bottom: 2px solid var(--primary-color);
}

.predworldcup-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.predworldcup-hero p {
    font-size: 1.3rem;
    color: var(--text-color);
    opacity: 0.9;
}

/* Countdown Section */
.countdown-section {
    margin: 4rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.countdown-card {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(255, 0, 255, 0.04) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 600px;
    min-width: 0;
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
}

.countdown-card h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.countdown-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 0 auto 2rem auto;
    width: fit-content;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-deadline {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Rules Section */
.rules-section {
    margin: 4rem 0;
}

.rules-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.2rem;
}

.rules-context {
    color: var(--text-color);
    line-height: 1.6;
    margin: -1.75rem auto 2rem;
    max-width: 760px;
    opacity: 0.82;
    text-align: center;
}

.rules-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.rule-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0, 255, 0, 0.02) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 255, 0, 0.15);
    border-color: var(--secondary-color);
}

.rule-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

.rule-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.rule-card p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.picks-list {
    list-style: none;
    padding: 0;
}

.picks-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
    line-height: 1.6;
}

.picks-list li::before {
    content: '▸';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.scoring-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1rem 0;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
}

.score-stage {
    color: var(--text-color);
    font-weight: 500;
}

.score-points {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-color);
    line-height: 1.6;
}

.rules-list li::before {
    content: '✓';
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.1rem;
}

.world-cup-link {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-color);
}

.fifa-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--background-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.5px;
    gap: 0.5rem;
    display: inline-flex;
    align-items: center;
}

.fifa-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 0, 0.3);
}

.fifa-link i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Form Section */
.form-section {
    margin: 4rem 0;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.05) 0%, rgba(255, 0, 255, 0.02) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.closed-message {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff3333;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.closed-message i {
    font-size: 2.5rem;
    color: #ff3333;
    margin-bottom: 1rem;
    display: block;
}

.closed-message p {
    font-size: 1.2rem;
    margin: 0;
}

.prediction-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group label {
    position: static;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    display: block;
    margin: 0;
    padding: 0;
    top: auto;
    left: auto;
    opacity: 1;
    background: transparent;
    order: 1;
}

/* Neutralize global floating-label behavior on this page */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    position: static;
    top: auto;
    left: auto;
    font-size: 0.85rem;
    background: transparent;
    padding: 0;
    color: var(--secondary-color);
}

/* Hide labels for team selections (in fieldsets) */
.prediction-group .form-group label {
    display: none;
}



.form-group input,
.form-group select {
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    height: 2.8rem;
    line-height: 1.6;
    appearance: none;
    order: 2;
}

.form-group input {
    padding-right: 1rem;
}

.form-group select {
    padding-right: 2.8rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff00' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.5rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.5);
}

.form-group select:focus {
    background-color: rgba(0, 0, 0, 0.5);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ff' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.form-group input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

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

.prediction-group {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 2rem 1.8rem;
}

.prediction-group legend {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1rem;
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    margin-left: -0.5rem;
}

.error-message {
    color: #ff3333;
    font-size: 0.8rem;
    display: block;
}

.global-error {
    background: rgba(255, 51, 51, 0.15);
    border: 1px solid #ff3333;
    color: #ff9999;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1rem;
}

.submit-button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--background-color);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 0, 0.3);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.success-message i {
    font-size: 3rem;
    color: var(--secondary-color);
    display: block;
    margin-bottom: 1rem;
}

.success-message h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.success-message p {
    color: var(--text-color);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.submission-confirmed {
    color: var(--secondary-color) !important;
}

.submission-warning {
    color: #ffcc66 !important;
}

.submission-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-action-button {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    background: rgba(0, 255, 0, 0.08);
    color: var(--secondary-color);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.status-action-button:hover:not(:disabled) {
    background: rgba(0, 255, 0, 0.18);
}

.status-action-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Entries Message */
.entries-message {
    margin: 4rem 0;
    text-align: center;
}

.message-card {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1) 0%, rgba(0, 255, 0, 0.05) 100%);
    border: 2px dashed var(--accent-color);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.message-card i {
    font-size: 3rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 1rem;
}

.message-card h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.message-card p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin: 0.8rem 0;
    line-height: 1.6;
}

/* Predictions Table */
.predictions-table-section {
    margin: 4rem 0;
}

.predictions-table-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.predictions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.predictions-table thead {
    background: rgba(0, 255, 0, 0.1);
    border-bottom: 2px solid var(--primary-color);
}

.predictions-table th {
    padding: 1rem;
    text-align: left;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.predictions-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--primary-color);
    color: var(--text-color);
}

.predictions-table tbody tr:hover {
    background: rgba(0, 255, 0, 0.05);
}

.picks-col {
    text-align: center;
    width: 120px;
}

.score-col {
    text-align: center;
    font-weight: 600;
    color: var(--secondary-color);
}

.team-badge {
    display: inline-block;
    background: rgba(0, 255, 0, 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.3rem;
    border: 1px solid var(--primary-color);
    white-space: nowrap;
}

.archive-notice {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0, 255, 255, 0.035) 100%);
    padding: 1.5rem;
    margin: 2rem 0;
}

.archive-kicker {
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.archive-notice h2 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.archive-notice p {
    color: var(--text-color);
    line-height: 1.6;
}

.archive-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-end;
}

.archive-action-button {
    cursor: pointer;
    font: inherit;
}

.previous-results-section {
    margin: 3rem 0;
}

.previous-results-header {
    margin-bottom: 1rem;
    text-align: center;
}

.previous-results-header h2 {
    color: var(--secondary-color);
}

.previous-results-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.previous-result-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0, 255, 255, 0.035) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 7rem;
    padding: 1.25rem;
    text-align: left;
    transition: all 0.3s ease;
}

.previous-result-card:hover,
.previous-result-card:focus-visible {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(0, 255, 0, 0.18);
    outline: none;
    transform: translateY(-3px);
}

.previous-result-card.is-disabled,
.previous-result-card:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.previous-result-card span {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.previous-result-card strong {
    color: var(--secondary-color);
    font-size: 1rem;
    line-height: 1.4;
}

.wc-results-panel[hidden] {
    display: none;
}

/* Leaderboard */
.leaderboard-section {
    margin: 4rem 0;
}

.leaderboard-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.leaderboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.winner-spotlight {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.16), rgba(0, 255, 0, 0.04));
    order: -4;
}

.winner-spotlight-icon {
    color: #ffd700;
    font-size: 2.6rem;
}

.winner-spotlight h3 {
    color: #ffd700;
    font-size: 2rem;
    margin: 0.2rem 0;
    overflow-wrap: anywhere;
}

.winner-spotlight p:last-child {
    color: var(--text-color);
    font-weight: 700;
}

.leaderboard-sort-status,
.leaderboard-empty {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    color: var(--text-color);
    opacity: 0.8;
}

.leaderboard-sort-status {
    order: -5;
}

.leaderboard-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0, 255, 0, 0.02) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.leaderboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    border-color: var(--secondary-color);
}

.leaderboard-card.rank-1 {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(0, 255, 0, 0.05) 100%);
    transform: scale(1.05);
    order: -3;
}

.leaderboard-card.rank-2 {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(0, 255, 0, 0.05) 100%);
    order: -2;
}

.leaderboard-card.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, rgba(0, 255, 0, 0.05) 100%);
    order: -1;
}

.rank-badge {
    display: inline-block;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.rank-1 .rank-badge {
    color: #ffd700;
}

.rank-2 .rank-badge {
    color: #c0c0c0;
}

.rank-3 .rank-badge {
    color: #cd7f32;
}

.rank-badge.number {
    font-size: 2rem;
    color: var(--secondary-color);
}

.leaderboard-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin: 0.5rem 0;
    display: none;
}

.leaderboard-username {
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.leaderboard-click {
    color: var(--text-color);
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.leaderboard-score {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 1rem 0;
}

.leaderboard-picks {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1rem;
    text-align: left;
}

.leaderboard-pick-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 0.8fr) minmax(0, 1.4fr);
    gap: 0.6rem;
    align-items: start;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 255, 0, 0.18);
}

.leaderboard-pick-stage {
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: bold;
}

.leaderboard-pick-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.leaderboard-picks .team-with-status {
    max-width: 100%;
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
    white-space: normal;
}

.leaderboard-correct {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.95rem;
}

.stage-results-section {
    margin-top: 3rem;
}

.stage-results-section h2 {
    margin-bottom: 1.5rem;
}

.stage-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 280px));
    gap: 1.25rem;
    justify-content: center;
}

.stage-result {
    border: 1px solid rgba(0, 255, 0, 0.65);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 16rem;
    width: 280px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.06), rgba(0, 255, 255, 0.025));
    transition: all 0.3s ease;
}

.stage-result:hover,
.stage-result:focus-visible {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(0, 255, 0, 0.16);
    outline: none;
}

.stage-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.25);
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
}

.stage-result h3 {
    color: var(--secondary-color);
    font-size: 1rem;
    margin: 0;
}

.stage-result-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.stage-result-teams {
    display: grid;
    grid-auto-rows: 2.1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    overflow: hidden;
}

.stage-result-team {
    border: 1px solid rgba(0, 255, 0, 0.55);
    border-radius: 4px;
    align-items: center;
    display: flex;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    color: var(--text-color);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.stage-result-more {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: auto;
    padding-top: 0.75rem;
}

.stage-modal-teams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.6rem;
}

.stage-result-empty {
    grid-column: 1 / -1;
    color: var(--text-color);
    opacity: 0.8;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .predworldcup-hero {
        padding: 3rem 1rem !important;
    }

    .predworldcup-hero h1 {
        font-size: 2rem;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .predworldcup-hero p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .countdown-section {
        margin: 3rem 0;
        min-width: 0;
    }

    .countdown-card {
        padding: 2rem 1rem;
    }

    .countdown-card h2 {
        font-size: 1.45rem;
    }

    .countdown-display {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 0.75rem;
    }

    .countdown-item {
        min-width: 0;
        padding: 1.25rem 0.5rem;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .rules-container {
        grid-template-columns: 1fr;
    }

    .predictions-table {
        font-size: 0.8rem;
    }

    .predictions-table th,
    .predictions-table td {
        padding: 0.7rem;
    }

    .leaderboard-container {
        grid-template-columns: 1fr;
    }

    .archive-notice,
    .winner-spotlight {
        align-items: flex-start;
        flex-direction: column;
    }

    .leaderboard-card.rank-1 {
        transform: scale(1);
    }

    .leaderboard-card {
        min-width: 0;
        padding: 1.25rem 1rem;
    }

    .leaderboard-pick-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .form-section {
        padding: 1.5rem 1rem;
    }

    .predictions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .predworldcup-container {
        padding-inline: 0.75rem;
    }

    .predworldcup-hero h1 {
        font-size: 1.65rem;
    }

    .countdown-deadline {
        font-size: 0.95rem;
    }
}

/* Admin Footer */
.predworldcup-footer {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.05) 0%, rgba(255, 0, 255, 0.02) 100%);
    border-top: 1px solid var(--primary-color);
    padding: 1.5rem;
    margin-top: 4rem;
    text-align: center;
}

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

.predworldcup-footer p {
    margin: 0;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.predworldcup-footer .admin-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.predworldcup-footer .admin-link:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(0, 20, 30, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 255, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--primary-color);
}

.modal-header h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.predictions-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prediction-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 0.5fr;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
    align-items: center;
}

.prediction-stage {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.prediction-teams {
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-with-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.status-icon {
    font-weight: bold;
    font-size: 1.1rem;
}

.team-with-status.correct {
    color: #00ff00;
}

.team-with-status.correct .status-icon {
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.team-with-status.wrong {
    color: #ff3333;
}

.team-with-status.wrong .status-icon {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.5);
}

.team-with-status.not-started {
    color: #ffaa00;
}

.team-with-status.not-started .status-icon {
    color: #ffaa00;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

.prediction-points {
    color: var(--secondary-color);
    font-weight: bold;
    text-align: right;
}

@media (max-width: 768px) {
    .prediction-row {
        grid-template-columns: 1fr;
    }

    .prediction-points {
        text-align: left;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .predworldcup-footer .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .predworldcup-footer .admin-link {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .stage-results-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stage-result {
        width: 100%;
    }
}
