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

html,
body {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    /* Modern, clean font */
    background: transparent;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    margin: 0;
    padding: 20px;
}

.winners-page {
    background-color: #050a14;
    /* Dark Blue */
    background-image: radial-gradient(circle at 50% 50%, #0e1a2f 0%, #050a14 100%);
    min-height: 100vh;
}

h1 {
    margin-bottom: 20px;
    color: #d4af37;
    /* Gold */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    color: #e0e0e0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 300;
}

.step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background: #d4af37;
    color: #050a14;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9em;
}

.step-arrow {
    color: #d4af37;
    font-size: 1.2em;
}

.price-display {
    font-size: 1.5em;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #d4af37, #f1c40f);
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard property for compatibility */
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect */
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.ticket {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    /* Transparent White */
    color: white;
    font-weight: 400;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticket:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.ticket.locked {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    /* Bright Red - Changed from Gold per user request */
    cursor: default;
    /* Changed from not-allowed so user feels ownership */
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
    border: 1px solid #e74c3c;
}

.ticket.sold {
    background: rgba(231, 76, 60, 0.2);
    /* Muted Red */
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: flex-start;
    /* Changed from center to flex-start */
    padding-top: 50px;
    /* Add space from top */
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #0e1a2f, #050a14);
    padding: 30px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* Subtle gold border */
    width: 90%;
    max-width: 450px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    text-align: center;
    color: white;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 5px;
    transition: color 0.3s;
}

.close:hover {
    color: #d4af37;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 300;
    color: #b0c4de;
    font-size: 0.9em;
}

/* Inputs */
.form-group input,
.iti__tel-input {
    /* Target intl-tel-input specifically if needed */
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-sizing: border-box;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    display: inline;
}

.checkbox-group a {
    color: #d4af37;
    text-decoration: underline;
}

.checkbox-group a:hover {
    color: #f1c40f;
}

.terms-text ul {
    padding-left: 20px;
    margin-top: 10px;
}

.terms-text li {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #e0e0e0;
}

/* Fix intl-tel-input text color */
.iti__selected-dial-code {
    color: #ffffff;
    /* White text when closed */
}

/* Open dropdown styling */
.iti__country-list {
    background-color: #ffffff;
    /* White background */
    border: 1px solid #ccc;
    color: #000000;
    /* Black text */
}

.iti__country-name,
.iti__dial-code {
    color: #000000;
    /* Ensuring black text for list items */
}

.btn {
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 50%, #d4af37 100%);
    background-size: 200% auto;
    color: #050a14;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    /* Slightly squarer for form buttons */
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn:active {
    transform: scale(0.98);
}

#selected-ticket-display {
    font-size: 28px;
    font-weight: 300;
    color: #d4af37;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

#paypal-button-container {
    margin-top: 25px;
}

.legend {
    margin-top: 10px;
    display: flex;
    gap: 25px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #ccc;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Winners Page Styles */
.winners-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align bottom so 1st place stands tall */
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.winner-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    width: 250px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.main-winner {
    width: 300px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0.8));
    border: 2px solid #d4af37;
    order: 2;
    /* Center visually if flex-wrap allows, otherwise we rely on HTML order */
}

/* Re-order for visual hierarchy: 3 (left), 1 (center), 2 (right) usually requires specific HTML order or flex order property */
#card-3 {
    order: 1;
}

#card-1 {
    order: 2;
    transform: scale(1.1);
    z-index: 10;
}

#card-2 {
    order: 3;
}

.rank-title {
    font-size: 1.2em;
    color: #e0e0e0;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-winner .rank-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #d4af37;
}

.ticket-display {
    font-size: 4em;
    font-weight: 700;
    color: white;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.winner-info {
    font-size: 1.2em;
    color: #d4af37;
    margin-bottom: 20px;
    opacity: 0;
    /* Hidden until won */
    transition: opacity 0.5s;
    min-height: 1.5em;
}

.btn-draw {
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 50%, #d4af37 100%);
    background-size: 200% auto;
    color: #050a14;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-draw:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-draw:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-draw:disabled {
    background: #333;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}