/* 36 July Run - Main Stylesheet (JAKSU Red & Green Theme) */

:root {
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: rgba(0, 106, 78, 0.12);
    --text-primary: #0f172a;
    --text-muted: #475569;
    
    /* Official JAKSU Colors */
    --jaksu-green: #006a4e;
    --jaksu-green-glow: rgba(0, 106, 78, 0.12);
    --jaksu-green-hover: #00503a;
    
    --flag-red: #da291c;
    --flag-red-glow: rgba(218, 41, 28, 0.12);
    
    --success-green: #10b981;
    --success-green-glow: rgba(16, 185, 129, 0.1);
    
    --error-red: #ef4444;
    --error-red-glow: rgba(239, 68, 68, 0.08);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Glowing Halos (Green and Red) */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

.bg-glow-1 {
    background: radial-gradient(circle, var(--jaksu-green-glow) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: floatGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
    background: radial-gradient(circle, var(--flag-red-glow) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation: floatGlow 15s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

/* App Container */
.container {
    width: 100%;
    max-width: 780px;
    padding: 2rem 1.25rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header & Banner styling */
.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 106, 78, 0.05);
    border: 1px solid rgba(0, 106, 78, 0.1);
    border-radius: 99px;
    padding: 0.4rem 1.1rem;
    margin-bottom: 0.25rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.logo-text .highlight {
    color: var(--jaksu-green);
}

.runner-icon {
    font-size: 1.1rem;
    color: var(--flag-red);
}


.main-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 850;
    letter-spacing: -0.5px;
    color: var(--jaksu-green);
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Card White Premium styling */
.main-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: 0 20px 40px -15px rgba(0, 106, 78, 0.06), 0 0 0 1px rgba(0, 106, 78, 0.02);
}

/* Search Area styling */
.search-section {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid rgba(0, 106, 78, 0.15);
    border-radius: 16px;
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    transition: var(--transition-smooth);
}

.input-wrapper:focus-within {
    border-color: var(--jaksu-green);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--jaksu-green-glow);
}

.phone-input-icon {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-right: 0.8rem;
    transition: var(--transition-smooth);
}

.input-wrapper:focus-within .phone-input-icon {
    color: var(--jaksu-green);
}

#phoneInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-body);
    width: 100%;
}

#phoneInput::placeholder {
    color: #94a3b8;
}

.btn-search {
    background: linear-gradient(135deg, var(--jaksu-green), #008260);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 106, 78, 0.2);
    transition: var(--transition-smooth);
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 106, 78, 0.3);
    filter: brightness(1.05);
}

.btn-search:active {
    transform: translateY(1px);
}

/* Results section */
.results-section {
    margin-top: 1.5rem;
    transition: var(--transition-smooth);
}

.results-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.result-card {
    border-radius: 20px;
    overflow: hidden;
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Success Card */
.success-card {
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.05);
}

.card-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(0, 106, 78, 0.06);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.success {
    background-color: var(--success-green-glow);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.25rem;
}

/* Info Pane styling */
.info-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-right: 1px solid rgba(0, 106, 78, 0.08);
    padding-right: 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.avatar {
    width: 48px;
    height: 48px;
    background: rgba(0, 106, 78, 0.07);
    border: 1px solid rgba(0, 106, 78, 0.15);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.35rem;
    color: var(--jaksu-green);
}

.user-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-val {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Event Details Box ( Kit distribution details ) */
.event-details-box {
    background: rgba(0, 106, 78, 0.03);
    border: 1px dashed rgba(0, 106, 78, 0.25);
    border-radius: 12px;
    padding: 1.1rem;
    margin-top: 0.5rem;
}

.event-box-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--jaksu-green);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.event-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-info-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #334155;
}

.event-box-icon {
    font-size: 0.95rem;
    color: var(--flag-red);
    width: 14px;
    text-align: center;
}

/* Assets Pane styling (BIB and T-Shirt) */
.assets-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
}

/* BIB Design */
.bib-container {
    width: 100%;
    max-width: 220px;
    background: #ffffff;
    color: #000000;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 106, 78, 0.1);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    border: 4px solid var(--jaksu-green);
}

.bib-container::before, .bib-container::after {
    content: '';
    position: absolute;
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: var(--bg-light);
    border-radius: 50%;
    border: 2px solid var(--jaksu-green);
}

.bib-container::before { left: 8px; }
.bib-container::after { right: 8px; }

.bib-tag {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 850;
    background: var(--flag-red);
    color: #ffffff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.bib-number {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    margin: 0.25rem 0;
    color: #0f172a;
}

.bib-footer {
    width: 100%;
    border-top: 1.5px dashed rgba(0, 106, 78, 0.15);
    padding-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
}

/* T-shirt Display */
.tshirt-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.tshirt-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 550;
}

.tshirt-wrapper {
    width: 75px;
    height: 75px;
    position: relative;
}

.tshirt-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 106, 78, 0.2));
}

.tshirt-body {
    fill: var(--jaksu-green);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 2.5;
}

.tshirt-size-text {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* Error/Not Found Card */
.error-card {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.03) 0%, #ffffff 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.error-icon {
    font-size: 3rem;
    color: var(--error-red);
}

.error-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.error-msg {
    color: var(--text-muted);
    max-width: 440px;
    font-size: 0.95rem;
}

.error-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.btn-primary {
    background: #25d366; /* WhatsApp Green */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
    background: #22c35e;
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Footer Section */
.footer {
    text-align: center;
    color: rgba(71, 85, 105, 0.6);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.designer-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.heart-icon {
    color: var(--flag-red);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .main-card {
        padding: 1.5rem;
    }
    
    .card-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-pane {
        border-right: none;
        border-bottom: 1px solid rgba(0, 106, 78, 0.08);
        padding-right: 0;
        padding-bottom: 1.5rem;
    }
}

/* Helper Class */
.hidden {
    display: none !important;
}
