/* ===== EVENTS GRID ===== */
.events-page-header {
    padding: 40px 20px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.events-page-title {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.events-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tab-btn.active {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

@media (max-width: 900px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

.grid-loading {
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 0;
    opacity: 0.5;
}

/* ===== EVENT CARD ===== */
.ev-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.ev-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.ev-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.ev-card.ended {
    opacity: 0.55;
    cursor: default;
}

.ev-logo {
    width: 64px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0.9);
}

.ev-logo-placeholder {
    width: 64px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    flex-shrink: 0;
}

.ev-info {
    flex: 1;
    min-width: 0;
}

.ev-type-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.55;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.ev-type-label.kod {
    color: #a78bfa;
}

.ev-type-label.bakiye {
    color: #34d399;
}

.ev-amount {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.ev-days {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.git-btn {
    padding: 6px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
}

.git-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px) scale(1.03);
    z-index: 1;
}

.git-btn.ended-btn {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.06);
    cursor: default;
}

/* ===== DETAIL VIEW ===== */
#eventDetailSection {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 80px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-back-bar {
    padding: 28px 0 12px;
}

.back-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.detail-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.detail-type-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    background: rgba(167, 139, 250, 0.14);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}

.detail-type-badge.bakiye {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.3);
    color: #34d399;
}

#detailTitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.detail-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 16px;
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.45;
    margin-bottom: 2px;
}

.stat-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.detail-action-btn {
    padding: 14px 32px;
    background: #fff;
    color: #111;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.detail-action-btn:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.detail-action-btn.joined-state {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.detail-action-btn.ended-state {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.detail-action-btn.kod-btn {
    background: #a78bfa;
    color: #fff;
}

.detail-action-btn.kod-btn:hover {
    background: #9570f5;
}

.detail-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

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

.detail-main {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
}

.detail-sponsor-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#detailSponsorLogo {
    max-height: 36px;
    max-width: 120px;
    object-fit: contain;
    filter: brightness(0.9);
}

.detail-capacity-bar-wrap {
    flex: 1;
}

.cap-bar-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}

.cap-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6c63ff, #a78bfa);
    transition: width 0.5s;
}

.detail-content-body {
    padding: 24px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    line-height: 1.7;
    white-space: pre-line;
}

.detail-kurallar-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    padding: 16px 24px 4px;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}



.sidebar-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 20px;
}

.sidebar-box-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ===== TOAST ===== */
.events-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    pointer-events: auto;
    white-space: normal;
    max-width: 90vw;
}

.events-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* loader */
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== DİĞER ETKİNLİKLER ===== */
.other-events-section {
    margin-top: 32px;
    padding-bottom: 40px;
}

.other-events-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.other-events-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.other-ev-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.18s;
    min-width: 220px;
    flex-shrink: 0;
}

.other-ev-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.other-ev-logo {
    width: 48px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0.88);
}

.other-ev-info {
    flex: 1;
    min-width: 0;
}

.other-ev-type {
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.other-ev-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.other-ev-git {
    padding: 5px 12px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s;
    flex-shrink: 0;
}

.other-ev-git:hover {
    background: rgba(255, 255, 255, 0.15);
}