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

/* ===== CSS O'ZGARUVCHILAR ===== */
:root {
  --theme-color: #D4AF37;
  --accent-color: #ffffff;
  --theme-rgb: 212, 175, 55;
  --accent-rgb: 255, 255, 255;
  --bg-opacity: 0.42;
}

body {
    background-color: transparent;
    font-family: 'Montserrat', sans-serif;
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Asosiy Konteyner */
.marathon-container {
    background: rgba(20, 20, 22, 0.96);
    padding: 35px 45px 30px;
    border-radius: 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7), 0 0 0 2px rgba(var(--theme-rgb), 0.15);
    text-align: center;
    max-width: 850px;
    width: 90%;
    box-sizing: border-box;
}

/* Sarlavhalar */
.header-section {
    margin-bottom: 20px;
}

.title-main {
    font-size: 72px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 3px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--theme-color) 60%, white) 0%, var(--theme-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-sub {
    font-size: 36px;
    font-weight: 800;
    margin: 5px 0 0 0;
    color: var(--theme-color);
    letter-spacing: 2px;
}

.qoldi-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 8px;
    margin-top: -18px;
    margin-bottom: 22px;
    text-transform: uppercase;
    opacity: 0.9;
    text-align: center;
}

/* ===== ASOSIY TAYMER ===== */
.main-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    width: 100%;
}

/* Timer box — yaltiragan border animatsiyasi */
.timer-box {
    position: relative;
    background: linear-gradient(135deg, #232329 0%, #17171a 100%);
    border-radius: 22px;
    padding: 15px 25px;
    min-width: 130px;
    flex-shrink: 0;
    /* Animatsiyali border uchun */
    border: 3px solid transparent;
    background-clip: padding-box;
    z-index: 0;
    overflow: hidden;
}

/* Yaltiragan border effekti */
.timer-box::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 24px;
    background: conic-gradient(
        from var(--angle, 0deg),
        transparent 0deg,
        var(--theme-color) 60deg,
        rgba(var(--theme-rgb), 0.8) 120deg,
        transparent 180deg,
        transparent 360deg
    );
    z-index: -1;
    animation: spin-border 3s linear infinite;
}

/* Border ichidagi qora fon */
.timer-box::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 20px;
    background: linear-gradient(135deg, #232329 0%, #17171a 100%);
    z-index: -1;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin-border {
    from { --angle: 0deg; }
    to   { --angle: 360deg; }
}

/* Inner glow */
.timer-box span {
    display: block;
    font-size: 76px;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.1;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(var(--theme-rgb), 0.4);
}

.timer-box label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: rgba(var(--accent-rgb), 0.6);
    margin-top: 5px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.colon {
    font-size: 54px;
    font-weight: 800;
    color: var(--theme-color);
    margin: 0 15px;
    animation: blink 1s infinite;
    line-height: 1;
}

.timer-arrow {
    font-size: 36px;
    color: var(--theme-color);
    margin: 0 20px;
    animation: pulse 1.5s infinite alternate;
}

/* Ma'lumotlar paneli */
.info-section {
    background: rgba(var(--theme-rgb), 0.08);
    border-radius: 24px;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    width: 100%;
}

.status-live {
    font-size: 28px;
    color: var(--theme-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.live-icon {
    width: 16px;
    height: 16px;
    background-color: #ff4a4a;
    border-radius: 50%;
    display: inline-block;
    margin-right: 15px;
    box-shadow: 0 0 14px #ff4a4a;
    animation: live-blink 1s infinite;
    flex-shrink: 0;
}

.live-counter {
    display: flex;
    align-items: center;
    font-size: 40px;
    font-weight: 800;
    flex-shrink: 0;
}

.live-counter div {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 8px;
}

.live-counter span {
    color: var(--accent-color);
    line-height: 1;
}

.live-counter label {
    font-size: 15px;
    font-weight: 800;
    color: rgba(var(--accent-rgb), 0.6);
    margin-top: 4px;
}

.mini-colon {
    font-size: 32px;
    font-weight: 800;
    color: rgba(var(--theme-rgb), 0.5);
    margin-top: -5px;
}

.divider {
    border: 0;
    height: 2px;
    background: rgba(var(--theme-rgb), 0.2);
    margin: 10px 0;
}

.action-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--theme-color);
    text-align: left;
    flex-shrink: 0;
}

.price-text {
    font-size: 32px;
    font-weight: 800;
    text-align: right;
    flex-shrink: 0;
    color: var(--accent-color);
}

.sub-price {
    display: block;
    font-size: 18px;
    color: var(--theme-color);
    font-weight: 700;
    margin-top: 4px;
}

/* Jami donat qismi */
.donation-section {
    width: 100%;
}

.donation-box {
    border: 3px solid var(--theme-color);
    border-radius: 60px;
    padding: 15px 50px;
    font-size: 48px;
    font-weight: 800;
    display: inline-block;
    background: rgba(var(--theme-rgb), 0.07);
    box-shadow: 0 0 25px rgba(var(--theme-rgb), 0.2);
    color: var(--accent-color);
}

.currency {
    color: var(--theme-color);
}

.support-footer {
    font-size: 18px;
    font-weight: 700;
    color: rgba(var(--accent-rgb), 0.5);
    margin-top: 15px;
    letter-spacing: 3px;
}

/* ===== OXIRGI DONAT BLOKI ===== */
.last-donation-wrapper {
    margin-top: 18px;
    width: 100%;
}

.last-donation-box {
    background: rgba(var(--theme-rgb), 0.07);
    border: 2px solid rgba(var(--theme-rgb), 0.25);
    border-radius: 20px;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
}

/* Yangi donat kelganda yaltirash */
.last-donation-box.flash {
    border-color: var(--theme-color);
    box-shadow: 0 0 22px rgba(var(--theme-rgb), 0.45);
    animation: flash-glow 1.2s ease-out;
}

@keyframes flash-glow {
    0%   { box-shadow: 0 0 0px rgba(var(--theme-rgb), 0); }
    30%  { box-shadow: 0 0 32px rgba(var(--theme-rgb), 0.7); }
    100% { box-shadow: 0 0 12px rgba(var(--theme-rgb), 0.15); }
}

.last-donor {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-color);
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.last-sep {
    font-size: 28px;
    font-weight: 800;
    color: rgba(var(--theme-rgb), 0.5);
}

.last-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--theme-color);
    white-space: nowrap;
}

.last-currency {
    font-size: 22px;
    font-weight: 700;
    opacity: 0.85;
}

/* --- ANIMATSIYALAR --- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes live-blink {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
}

@keyframes pulse {
    0% { transform: translateX(0); opacity: 0.5; }
    100% { transform: translateX(8px); opacity: 1; }
}
