:root {
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.6);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.6);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.6);
    --cyan: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    /* Deep space background */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.08), transparent 40%),
        radial-gradient(1px 1px at 10% 10%, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        radial-gradient(1px 1px at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        radial-gradient(2px 2px at 30% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        radial-gradient(1px 1px at 40% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        radial-gradient(2px 2px at 50% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-size: 100% 100%, 100% 100%, 550px 550px, 350px 350px, 250px 250px, 150px 150px, 450px 450px;

    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand img {
    height: 48px;
    width: 48px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 20px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
}

.brand span {
    font-weight: 800;
    font-size: 1.4rem;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #e2e8f0;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Main Layout */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Search Card - Rebuilt for cleanliness */
.search-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    backdrop-filter: blur(24px);
    padding: 4rem 3rem;
    border-radius: 32px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.search-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    letter-spacing: -1px;
}

.search-desc {
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Input - FLEXBOX APPROACH (Fixed Alignment) */
.search-input-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px;
    /* Inner spacing for button */
    display: flex;
    align-items: center;
    max-width: 650px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.search-input-wrapper input {
    flex: 1;
    /* Takes available space */
    background: transparent;
    border: none;
    padding: 15px 20px;
    font-size: 1.2rem;
    color: white;
    outline: none;
    font-family: inherit;
    font-weight: 500;
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
    filter: brightness(1.1);
}

.search-btn:active {
    transform: translateY(0);
}

/* Result Card */
.result-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(30px);
    border-radius: 32px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: none;
    animation: holographFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

@keyframes holographFade {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.result-header {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    padding: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-info h2 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.badge-glow {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    padding: 10px 24px;
    border-radius: 16px;
    font-size: 1.25rem;
    font-weight: 700;
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
    font-family: 'Courier New', monospace;
    /* Tech feel */
}

.result-body {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
    transition: all 0.3s ease;
}

.info-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.col-full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

/* Specific Box Colors */
.box-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.box-danger .info-value {
    color: #fca5a5;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.box-cyan {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.box-cyan .info-value {
    color: #67e8f9;
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.box-business {
    background: rgba(255, 255, 255, 0.04);
}

/* Student Meta Info */
.student-meta {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.student-dept {
    margin-top: 8px;
    font-size: 1.1rem;
    color: #94a3b8;
}

/* Business Details */
.business-details {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 8px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Last Update Badge */
.last-update-badge {
    text-align: center;
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.last-update-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
}

.last-update-date {
    color: #22d3ee;
    font-weight: 600;
}

/* Refresh Modal */
.refresh-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.refresh-modal-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.refresh-modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.refresh-modal-title {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
}

.refresh-modal-text {
    color: #94a3b8;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.refresh-modal-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
    font-family: inherit;
}

.refresh-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Responsive Grid */
@media (max-width: 768px) {
    .result-body {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 1.5rem;
        gap: 2.5rem;
    }

    .search-card {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .search-title {
        font-size: 2.8rem;
    }

    .search-desc {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }

    .brand img {
        height: 40px;
        width: 40px;
    }

    .brand span {
        font-size: 1.15rem;
    }

    .nav-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .result-card {
        border-radius: 20px;
    }

    .result-header {
        padding: 1.5rem;
    }

    .result-body {
        padding: 1.5rem;
        gap: 1rem;
    }

    .info-box {
        padding: 1.2rem;
        border-radius: 14px;
        min-height: 80px;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 1.3rem;
    }

    .badge-glow {
        font-size: 1.1rem;
        padding: 10px 18px;
    }
}

/* Message */
#message {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.msg-loading {
    color: var(--cyan);
    font-weight: 600;
}

.msg-error {
    color: var(--secondary);
    background: rgba(236, 72, 153, 0.1);
    padding: 10px 20px;
    border-radius: 12px;
    display: inline-block;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    margin-top: auto;
}

/* =============================================
   📱 MOBİL UYUMLULUK - TELEFON (640px ve altı)
   ============================================= */
@media (max-width: 640px) {

    /* --- NAVBAR --- */
    .navbar {
        padding: 0.6rem 0.8rem;
        gap: 6px;
    }

    .brand {
        gap: 10px;
        min-width: 0;
        flex: 1;
    }

    .brand img {
        height: 34px;
        width: 34px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .brand span {
        font-size: 0.95rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-btn {
        padding: 7px 12px;
        font-size: 0.8rem;
        border-radius: 10px;
        gap: 5px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* --- ANA CONTAINER --- */
    .main-container {
        padding: 1rem 0.8rem;
        gap: 1.5rem;
    }

    /* --- ARAMA KARTI --- */
    .search-card {
        padding: 2rem 1.2rem;
        border-radius: 20px;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    }

    .search-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
        letter-spacing: -0.5px;
    }

    .search-desc {
        font-size: 0.9rem;
        margin-bottom: 1.8rem;
        line-height: 1.5;
    }

    .search-input-wrapper {
        flex-direction: column;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        gap: 10px;
    }

    .search-input-wrapper:focus-within {
        border-color: transparent;
        box-shadow: none;
        background: transparent;
    }

    .search-input-wrapper input {
        width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(0, 0, 0, 0.35);
        border-radius: 14px;
        text-align: center;
        padding: 14px 16px;
        font-size: 1.05rem;
        box-sizing: border-box;
    }

    .search-input-wrapper input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
    }

    .search-btn {
        width: 100%;
        padding: 14px;
        border-radius: 14px;
        font-size: 1rem;
    }

    /* --- SONUÇ KARTI --- */
    .result-card {
        border-radius: 18px;
    }

    .result-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
        padding: 1.2rem;
    }

    .student-info h2 {
        font-size: 1.4rem;
        letter-spacing: -0.3px;
    }

    .student-meta {
        justify-content: center;
        font-size: 0.8rem;
        gap: 8px;
    }

    .student-dept {
        font-size: 0.9rem;
    }

    .student-info {
        order: 2;
    }

    .badge-glow {
        order: 1;
        font-size: 0.95rem;
        padding: 8px 16px;
        border-radius: 12px;
    }

    .result-body {
        padding: 1rem;
        gap: 0.8rem;
        grid-template-columns: 1fr;
    }

    .business-details {
        flex-direction: column;
        gap: 6px;
        font-size: 0.8rem;
    }

    .last-update-badge {
        margin-top: 12px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .last-update-text {
        font-size: 0.82rem;
    }

    .info-box {
        padding: 1rem;
        border-radius: 12px;
        min-height: 65px;
    }

    .info-label {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .info-value {
        font-size: 1.15rem;
    }

    .col-full {
        grid-column: 1 / -1;
    }

    /* --- FOOTER --- */
    .footer {
        padding: 1.2rem 0.8rem;
        font-size: 0.8rem;
    }

    /* --- MESAJ --- */
    #message {
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    .msg-error {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    /* --- REFRESH MODAL --- */
    .refresh-modal-box {
        padding: 28px 20px;
        margin: 16px;
        border-radius: 16px;
    }

    .refresh-modal-icon {
        font-size: 3rem;
        margin-bottom: 14px;
    }

    .refresh-modal-title {
        font-size: 1.2rem;
    }

    .refresh-modal-text {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }

    .refresh-modal-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

}

/* =============================================
   📱 KÜÇÜK TELEFON (400px ve altı)
   ============================================= */
@media (max-width: 400px) {
    .navbar {
        padding: 0.5rem 0.6rem;
    }

    .brand span {
        font-size: 0.82rem;
    }

    .brand img {
        height: 30px;
        width: 30px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .main-container {
        padding: 0.8rem 0.5rem;
    }

    .search-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .search-title {
        font-size: 1.6rem;
    }

    .search-desc {
        font-size: 0.82rem;
        margin-bottom: 1.4rem;
    }

    .search-input-wrapper input {
        font-size: 0.95rem;
        padding: 12px 14px;
    }

    .search-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .result-header {
        padding: 1rem;
    }

    .result-header h2 {
        font-size: 1.1rem;
    }

    .student-meta {
        font-size: 0.72rem;
        gap: 6px;
    }

    .student-dept {
        font-size: 0.8rem;
    }

    .badge-glow {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .result-body {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .info-box {
        padding: 0.8rem;
        min-height: 55px;
    }

    .info-label {
        font-size: 0.7rem;
    }

    .info-value {
        font-size: 1rem;
    }
}

/* =============================================
   🖥️ BÜYÜK EKRAN (1200px ve üstü)
   ============================================= */
@media (min-width: 1200px) {
    .main-container {
        max-width: 960px;
    }
}