/* --- RESET & VARIABLES --- */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0D0D0D;
    --card-surface: rgba(20, 20, 20, 0.85);
    --card-border: rgba(212, 175, 55, 0.25);
    
    --gold-main: #D4AF37;
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
    --gold-glow: rgba(212, 175, 55, 0.3);
    
    --text-main: #FFFFFF;
    --text-muted: #A3A3A3;
    
    --font-family: 'Poppins', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: #000000;
    font-family: var(--font-family);
    color: var(--text-main);
}

body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #000000;
}

/* --- AMBIENT DESKTOP CONTAINER --- */
.mobile-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-primary);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.1);
    overflow-x: hidden;
    padding-top: 60px; /* Space for fixed header */
}

/* --- UTILITIES & TYPOGRAPHY --- */
.gold-text {
    color: var(--gold-main);
}

.gold-text-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.card {
    background: var(--card-surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.section {
    padding: 32px 18px;
}

.section-header {
    text-align: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.title-underline {
    width: 50px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 6px auto 0;
    border-radius: 2px;
}

.sub-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #000000;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--gold-main);
}

.btn-outline:active {
    background: rgba(212, 175, 55, 0.1);
}

/* --- MOBILE HEADER --- */
.mobile-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 18px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.nav-toggle {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--gold-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* Active Hamburger Animation */
.nav-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav Drawer */
.mobile-nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.mobile-nav.open {
    max-height: 320px;
}

.nav-list {
    list-style: none;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    transition: var(--transition);
}

.nav-link:active {
    color: var(--gold-main);
    padding-left: 8px;
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    height: calc(100vh - 60px);
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 20px 48px;
    background-image: url('assets/hero-background.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 8, 4, 0) 55%, rgba(10, 8, 4, 0.85) 85%, var(--bg-primary) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.badge-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold-main);
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

/* Scroll Dot Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    width: 20px;
    height: 32px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.mouse-dot {
    width: 4px;
    height: 6px;
    background: var(--gold-main);
    border-radius: 2px;
    animation: scrollDot 1.8s infinite;
}

@keyframes scrollDot {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(12px); }
}

/* --- ABOUT SECTION --- */
.about-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text-main);
}

.core-values {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.value-icon {
    font-size: 1.2rem;
    background: rgba(212, 175, 55, 0.1);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.value-info h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.value-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- ACHIEVEMENTS SECTION --- */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-card {
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.achievement-card:active {
    transform: translateY(-2px);
    border-color: var(--gold-main);
}

.trophy-badge {
    width: 44px;
    height: 44px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trophy-badge.silver {
    background: rgba(192, 192, 192, 0.1);
    border-color: rgba(192, 192, 192, 0.3);
}

.rank-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rank-tag.gold {
    background: var(--gold-gradient);
    color: #000;
}

.rank-tag.silver {
    background: #C0C0C0;
    color: #000;
}

.tournament-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.prize-pool {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- TEAM & ROSTER SECTION --- */
.sub-section {
    margin-bottom: 28px;
}

/* Management Grid */
.management-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.mgmt-card {
    /* Sama persis dengan .roster-card: rasio foto 3:4 (lihat .player-photo-wrapper) */
}

/* Roster Tabs */
.roster-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--gold-gradient);
    color: #000000;
    border-color: transparent;
}

/* STRICT 3-COLUMN ROSTER GRID WITH 3:4 ASPECT RATIO */
.roster-grid {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.roster-grid.active {
    display: grid;
}

.roster-card {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
}

.player-photo-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 Aspect Ratio (4 / 3 = 1.333) */
}

.player-photo-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: var(--transition);
}

.roster-card:active .player-photo-wrapper img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0) 100%);
}

.player-info {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    padding: 0 6px;
    text-align: center;
    z-index: 2;
}

.player-name {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-pill {
    display: inline-block;
    padding: 1px 5px;
    background: rgba(212, 175, 55, 0.2);
    border: 0.5px solid var(--gold-main);
    color: var(--gold-main);
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
}

/* --- GALLERY SECTION --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 3/4;
    border: 1px solid var(--card-border);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-hover-overlay span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold-main);
    letter-spacing: 1px;
    border: 1px solid var(--gold-main);
    padding: 4px 10px;
    border-radius: 4px;
}

.gallery-item:active img {
    transform: scale(1.08);
}

.gallery-item:active .gallery-hover-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gold-main);
    box-shadow: 0 0 30px var(--gold-glow);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--gold-main);
    cursor: pointer;
}

/* --- NEWS SECTION --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-card {
    display: flex;
    gap: 12px;
    padding: 10px;
}

.news-thumb {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date {
    font-size: 0.6rem;
    color: var(--gold-main);
    font-weight: 700;
    margin-bottom: 4px;
}

.news-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- FOOTER --- */
.mobile-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    padding: 32px 20px 24px;
    text-align: center;
}

.footer-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.social-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-main);
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:active {
    background: var(--gold-gradient);
    color: #000;
}

.sponsors-row {
    margin-bottom: 20px;
}

.sponsor-tag {
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 8px;
}

.sponsor-logos {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sponsor-item {
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.copyright {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

/* --- ANIMATIONS ON SCROLL --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- EMPTY STATE (dipakai saat data dari Worker KV masih kosong) --- */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 20px 10px;
    width: 100%;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

/* --- BRONZE VARIANT (opsional, untuk rank ke-3) --- */
.trophy-badge.bronze {
    background: rgba(205, 127, 50, 0.12);
    border-color: rgba(205, 127, 50, 0.35);
}

.rank-tag.bronze {
    background: #CD7F32;
    color: #000;
}

/* --- NEWS LINK --- */
.news-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-main);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.news-link:active {
    opacity: 0.7;
}

/* --- SECTION TRIAL & FORM --- */
.trial-subtitle {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0 6px;
}

.trial-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-input,
.form-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold-main);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}

select.form-input option {
    background: #0D0D0D;
    color: #F5F5F5;
}

.form-submit-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    margin-top: 4px;
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    font-size: 0.78rem;
    text-align: center;
    min-height: 18px;
}

.form-status.success {
    color: #6EE7B7;
}

.form-status.error {
    color: #F87171;
}

/* --- KARTU COOLDOWN TRIAL (setelah form dikirim) --- */
.trial-cooldown {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 20px;
}

.trial-cooldown-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 4px;
}

.trial-cooldown-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.trial-cooldown-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.trial-cooldown-text strong {
    color: var(--gold-main);
    font-variant-numeric: tabular-nums;
}
