/* OGRSIS Ogrenci Ortak Header ve Layout CSS */
:root {
    --primary: #10b981;
    --gray-100: #f3f4f6;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

body {
    background: var(--gray-100);
    min-height: 100vh;
}

.navbar {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    font-size: 1.75rem;
}

.navbar-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.school-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    margin-right: 1rem;
}

.school-selector i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.school-selector select {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding-right: 20px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
}

.school-selector select option {
    background: #1f2937;
    color: #fff;
}

.school-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fff;
}

.btn-login-guest {
    background: #fff;
    color: #065f46;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-login-guest:hover {
    background: #d1fae5;
}

.guest-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fef3c7;
    color: #92400e;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.guest-bar a {
    color: #065f46;
    font-weight: 600;
}

.player-chip {
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.player-chip:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-chip .player-chip-edit {
    font-size: 0.75rem;
}

.name-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 78, 59, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: 'Poppins', sans-serif;
}

.name-modal[hidden],
.name-modal [hidden] {
    display: none !important;
}

.name-modal-card {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.name-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.name-modal-card h2 {
    font-size: 1.4rem;
    color: #1f2937;
    margin-bottom: 0.4rem;
}

.name-modal-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.name-modal-card input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    outline: none;
}

.name-modal-card input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.name-modal-message {
    margin-top: 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}

.name-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.name-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.name-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.name-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.name-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.name-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.3rem;
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .navbar-panel {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 0.75rem;
    }

    .navbar-panel.active {
        display: flex;
    }

    .navbar-menu {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .nav-link {
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
    }

    .user-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .school-selector {
        margin-right: 0;
        flex: 1 1 100%;
    }

    .btn-logout {
        margin-left: auto;
    }
}
