/* RTEU CENG Ders Platformu - Premium Tasarım */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #0c0f1a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Üst Çubuk */
.topbar {
    background: rgba(15, 18, 35, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar .logo {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94a3b8;
}

.topbar a {
    color: #94a3b8;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.topbar a:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
}

.topbar .btn-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
}

.topbar .btn-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.topbar .btn-admin {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.topbar .btn-admin:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.topbar .btn-login {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 600;
    border: none;
}

.topbar .btn-login:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Sayfa Konteyneri */
.container {
    max-width: 960px;
    margin: 48px auto;
    padding: 0 24px;
}

/* Sayfa Başlığı */
.page-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    color: #f1f5f9;
    letter-spacing: -0.5px;
}

/* Ders Kartları */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.course-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30, 34, 60, 0.8), rgba(20, 24, 48, 0.9));
    padding: 32px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: #e2e8f0;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.course-card:hover::before {
    opacity: 1;
}

/* Dosya Listesi (ders içi) */
.file-list {
    list-style: none;
}

.file-list li {
    margin-bottom: 12px;
}

.file-btn {
    display: block;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(145deg, rgba(30, 34, 60, 0.7), rgba(20, 24, 48, 0.8));
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.file-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #a855f7);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.file-btn:hover {
    background: linear-gradient(145deg, rgba(40, 44, 75, 0.9), rgba(30, 34, 60, 0.9));
    transform: translateX(6px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.file-btn:hover::before {
    opacity: 1;
}

/* Geri Dön Butonu */
.btn-back {
    display: inline-block;
    margin-bottom: 28px;
    padding: 10px 22px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.btn-back:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
}

/* Giriş Kutusu */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
}

.login-box {
    background: linear-gradient(145deg, rgba(30, 34, 60, 0.9), rgba(15, 18, 35, 0.95));
    padding: 44px;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 800;
    font-size: 28px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-box .subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 28px;
    font-size: 14px;
    font-weight: 500;
}

/* Form Elemanları */
label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(15, 18, 35, 0.8);
    color: #e2e8f0;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 13px;
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.15);
    box-shadow: none;
    color: #a5b4fc;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.3);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

/* Mesajlar */
.msg-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.msg-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    color: #86efac;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Admin Tablo */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
    background: rgba(99, 102, 241, 0.08);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.admin-table td {
    font-size: 14px;
}

.admin-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Admin Panel Kartları */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-card {
    display: block;
    background: linear-gradient(145deg, rgba(30, 34, 60, 0.8), rgba(20, 24, 48, 0.9));
    padding: 36px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: #e2e8f0;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1);
}

.admin-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 700;
}

.admin-card p {
    color: #64748b;
    font-size: 14px;
}

/* Form Bölümü */
.form-section {
    background: linear-gradient(145deg, rgba(30, 34, 60, 0.6), rgba(20, 24, 48, 0.7));
    padding: 28px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-section h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dosya İçerik Çerçevesi (view.php) */
.content-frame {
    max-width: 1100px;
    margin: 24px auto;
    padding: 24px;
    background: #fff;
    color: #222;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    min-height: calc(100vh - 120px);
    overflow-x: auto;
}

/* Site Footer İstatistikleri */
.site-footer {
    margin-top: 60px;
    padding: 24px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 18, 35, 0.5);
}

.footer-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #64748b;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-item strong {
    color: #94a3b8;
    font-weight: 600;
}

.stat-online strong {
    color: #4ade80;
}

.stat-divider {
    color: rgba(255, 255, 255, 0.1);
    font-size: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .topbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px 16px;
    }

    .container {
        padding: 0 16px;
        margin: 24px auto;
    }

    .page-title {
        font-size: 24px;
        margin-bottom: 28px;
    }

    .course-card {
        padding: 24px 16px;
        font-size: 15px;
    }

    .login-box {
        padding: 28px 20px;
        margin: 0 16px;
    }

    .footer-stats {
        gap: 8px;
        font-size: 12px;
    }

    .stat-divider {
        display: none;
    }
}