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

:root {
    --primary-color: #ff5500;
    --primary-glow: rgba(255, 85, 0, 0.4);
    --secondary-color: #ffb700;
    --secondary-glow: rgba(255, 183, 0, 0.4);
    --bg-dark: #0a0a0e;
    --bg-card: rgba(20, 20, 28, 0.85);
    --bg-input: rgba(10, 10, 15, 0.9);
    --text-color: #ffffff;
    --text-muted: #a0a0b0;
    --success-color: #00ff66;
    --success-glow: rgba(0, 255, 102, 0.3);
    --card-border: rgba(255, 85, 0, 0.2);
    --card-border-hover: rgba(255, 183, 0, 0.5);
    --transition-speed: 0.25s;
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 85, 0, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 183, 0, 0.06) 0%, transparent 40%),
        linear-gradient(135deg, #07070a 0%, #111118 100%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* Prevent scrolling to fit on a single screen */
}

/* Glowing text effects */
.glow-text-orange {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-glow);
}

.glow-text-yellow {
    color: var(--secondary-color);
    text-shadow: 0 0 8px var(--secondary-glow);
}

.container {
    width: 100%;
    max-width: 480px; /* Reduced width for more compact look */
    padding: 10px 15px; /* Shrunk padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    z-index: 2;
}

/* Header section */
header {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 10px; /* Compact margin */
    width: 100%;
}

.fire-logo-container {
    margin-bottom: 4px;
    display: inline-block;
}

.ff-header-logo {
    max-width: 130px;
    max-height: 65px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--primary-glow));
    animation: logoPulse 2s infinite alternate;
}

h1 {
    font-size: 1.5rem; /* Shrunk from 2.2rem */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.1;
}

.sub-title {
    font-size: 0.85rem; /* Shrunk from 1.1rem */
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Card layout */
.card-box {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 15px; /* Shrunk from 24px */
    width: 100%;
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    overflow: hidden;
    margin-bottom: 12px; /* Compact margin */
}

.card-box:hover {
    border-color: rgba(255, 85, 0, 0.3);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.5);
}

.card-title {
    font-size: 1.15rem; /* Shrunk from 1.4rem */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-align: center;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.8rem; /* Shrunk from 0.95rem */
    line-height: 1.35;
    text-align: center;
    margin-bottom: 12px;
}

/* Input styles */
.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1rem;
}

.input-field {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 12px 10px 36px; /* Reduced paddings */
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-speed);
}

.input-field:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(255, 183, 0, 0.15);
}

.input-field::placeholder {
    color: #444455;
}

/* Button styles */
.btn-primary {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff2a00 100%);
    border: none;
    border-radius: 8px;
    padding: 11px; /* Shrunk from 14px */
    color: #fff;
    font-size: 1rem; /* Shrunk from 1.2rem */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 10px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.5);
}

.btn-primary:disabled {
    background: #202028;
    color: #505060;
    cursor: not-allowed;
    box-shadow: none;
}

/* Live Winners Section */
.winners-section {
    width: 100%;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Shrunk gap */
}

.section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 3px;
}

.section-label h3 {
    font-size: 0.9rem; /* Shrunk from 1.1rem */
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.live-pulse-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 0, 0, 0.08);
    border: 1px solid rgba(255, 0, 0, 0.15);
    padding: 2px 7px;
    border-radius: 20px;
}

.live-pulse {
    width: 6px;
    height: 6px;
    background-color: #ff3333;
    border-radius: 50%;
    box-shadow: 0 0 6px #ff3333;
    animation: livePulseAnim 1.2s infinite;
}

.live-pulse-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ff5555;
    text-transform: uppercase;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Shrunk gap */
    width: 100%;
    min-height: 140px; /* Reduced to fit 3 items */
}

.winner-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 8px 12px; /* Shrunk from 12px 16px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    animation: cardSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
}

.winner-card.monthly::before {
    background: var(--secondary-color);
}

.winner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.winner-avatar {
    width: 28px; /* Shrunk from 38px */
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 85, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-avatar i {
    font-size: 0.85rem;
}

.winner-details {
    display: flex;
    flex-direction: column;
}

.winner-name {
    font-size: 0.85rem; /* Shrunk from 1.0rem */
    font-weight: 600;
    color: #fff;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-claimed {
    font-size: 0.7rem; /* Shrunk from 0.8rem */
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
}

.winner-prize-badge {
    background: rgba(255, 85, 0, 0.07);
    border: 1px solid rgba(255, 85, 0, 0.15);
    padding: 4px 8px; /* Shrunk from 6px 12px */
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.winner-prize-badge.monthly {
    background: rgba(255, 183, 0, 0.07);
    border: 1px solid rgba(255, 183, 0, 0.15);
}

.prize-icon {
    width: 14px; /* Shrunk from 18px */
    height: 14px;
    object-fit: contain;
}

.prize-text {
    font-size: 0.75rem; /* Shrunk from 0.85rem */
    font-weight: 700;
    text-transform: uppercase;
}

.prize-text.weekly {
    color: #ff7700;
}

.prize-text.monthly {
    color: #ffb700;
}

/* Modal Popup Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(135deg, #0e0e15 0%, #151522 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    box-shadow: 0 0 25px var(--primary-glow);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-overlay.monthly .modal-content {
    border-color: var(--secondary-color);
    box-shadow: 0 0 25px var(--secondary-glow);
}

.modal-badge-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-badge-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
}

.modal-overlay.monthly .modal-badge-glow {
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
}

.modal-prize-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    z-index: 2;
    animation: bounceLogo 2s infinite alternate;
}

.modal-header-text {
    font-size: 1.45rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.modal-body-text {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.modal-body-text strong {
    font-weight: 700;
}

.modal-highlight-name {
    color: var(--secondary-color);
    text-shadow: 0 0 4px var(--secondary-glow);
}

.modal-highlight-level {
    color: var(--success-color);
    text-shadow: 0 0 4px var(--success-glow);
}

.modal-highlight-prize {
    color: var(--primary-color);
    text-shadow: 0 0 4px var(--primary-glow);
}

.modal-overlay.monthly .modal-highlight-prize {
    color: var(--secondary-color);
    text-shadow: 0 0 4px var(--secondary-glow);
}

/* Claim Verification Button in Modal */
.btn-verify {
    width: 100%;
    background: linear-gradient(90deg, #ff5500 0%, #ff2a00 100%);
    border: none;
    border-radius: 10px;
    padding: 13px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition-speed);
}

.modal-overlay.monthly .btn-verify {
    background: linear-gradient(90deg, #ffb700 0%, #ff8800 100%);
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-verify:hover {
    transform: scale(1.02);
}

.btn-verify img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Spinner / Loader Styles */
.loader-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    gap: 8px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 85, 0, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer Section */
footer {
    width: 100%;
    padding: 8px 0; /* Shrunk padding */
    text-align: center;
    color: #333344;
    font-size: 0.75rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.01);
    z-index: 2;
}

/* Animations */
@keyframes logoPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 85, 0, 0.3));
    }
    100% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 15px rgba(255, 85, 0, 0.6));
    }
}

@keyframes livePulseAnim {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceLogo {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

/* Responsive styles */
@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem;
    }
    
    .sub-title {
        font-size: 0.8rem;
    }

    .card-box {
        padding: 12px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-header-text {
        font-size: 1.3rem;
    }

    .modal-body-text {
        font-size: 0.85rem;
        padding: 10px;
        margin-bottom: 14px;
    }
    
    .btn-verify {
        font-size: 0.95rem;
        padding: 11px;
    }
}
