/* === TEMA & DEĞİŞKENLER === */
:root {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --border-color: #334155;
    --primary-color: #2ea043;
    --primary-glow: rgba(46, 160, 67, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-purple: #8b5cf6;
    --accent-gold: #fbbf24;
    --accent-blue: #38bdf8;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --shadow-card: 0 10px 30px -10px rgba(0,0,0,0.5);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-color: #f0f9ff;
    --surface-color: #ffffff;
    --surface-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --primary-color: #16a34a;
    --primary-glow: rgba(22, 163, 74, 0.3);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--primary-color);
}

.search-area {
    flex: 1;
    max-width: 700px;
    display: flex;
    gap: 10px;
}

.search-container {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 50px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0 20px 0 50px;
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.btn-filter-trigger {
    height: 50px;
    padding: 0 25px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    white-space: nowrap;
}

.btn-filter-trigger:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: none;
}

.btn-filter-trigger.active .filter-badge {
    display: inline-block;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.icon-btn:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* === HERO === */
.campus-hero {
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(46, 160, 67, 0.1) 100%);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.campus-hero-content {
    z-index: 2;
    max-width: 600px;
}

.campus-hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.campus-hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 25px;
}

.campus-hero::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.4;
}

/* === GRID === */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

/* === PROJECT CARD === */
.project-card {
    background: var(--surface-color);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-card);
    border-color: var(--primary-color);
}

.card-thumb {
    height: 180px;
    background: #2d3748;
    position: relative;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .card-thumb img {
    transform: scale(1.1);
}

.verified-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #4ade80;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #4ade80;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-grade {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
}

.tag-subject {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.card-school {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.card-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-main);
}

.author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.stats {
    display: flex;
    gap: 12px;
}

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

/* === FILTER MODAL === */
.filter-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

.filter-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.filter-panel {
    background: var(--surface-color);
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.filter-modal-overlay.active .filter-panel {
    transform: translateY(0);
}

.filter-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-hover);
}

.filter-body {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.filter-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 1px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.custom-select, .custom-input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

.checkbox-item:hover {
    background: var(--surface-hover);
}

.filter-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-hover);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
}

.btn-apply {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: 0.2s;
}

/* === DETAIL MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--surface-color);
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: 0.4s;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    background: linear-gradient(to bottom, var(--surface-hover), var(--surface-color));
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.3);
    border: none;
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-btn:hover {
    background: rgba(0,0,0,0.5);
}

.modal-title-area h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 8px;
    padding-right: 50px;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-badge {
    padding: 4px 10px;
    background: rgba(46, 160, 67, 0.15);
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

.modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.modal-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-sidebar {
    width: 340px;
    padding: 25px;
    border-left: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    scrollbar-width: none;
}

.modal-sidebar::-webkit-scrollbar {
    display: none;
}

/* === GALLERY === */
.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
}

.gallery-container {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: 0.2s;
    font-size: 1.2rem;
}

.gallery-nav:hover {
    background: var(--primary-color);
}

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

/* === TAB MENU === */
.tab-menu {
    display: flex;
    gap: 25px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.tab-btn {
    padding-bottom: 12px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.code-block {
    background: #0d1117;
    color: #c9d1d9;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    margin-top: 10px;
    border: 1px solid #30363d;
    font-size: 0.9rem;
}

/* === SIDEBAR CARDS === */
.stat-pill {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.stat-pill i {
    font-size: 1.2rem;
}

.edu-action-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    transition: 0.3s;
}

.edu-action-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-download-edu {
    background: linear-gradient(135deg, #2ea043 0%, #238636 100%);
    color: white;
    padding: 16px;
    border-radius: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(46, 160, 67, 0.3);
    font-size: 1.05rem;
    transition: 0.3s;
}

.btn-download-edu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 160, 67, 0.4);
}

.btn-like-edu {
    background: rgba(244, 63, 94, 0.1);
    border: 2px solid #f43f5e;
    color: #f43f5e;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-like-edu:hover {
    background: #f43f5e;
    color: white;
}

.rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 8px;
    justify-content: center;
}

.rating-stars i {
    color: #5f6368;
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.rating-stars i:hover,
.rating-stars i:hover ~ i {
    color: var(--accent-gold) !important;
}

/* === AUTH === */
.btn-login {
    background: var(--primary-color);
    color: #fff;
    padding: 0 20px;
    height: 40px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-login:hover {
    filter: brightness(1.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border-color);
    color: #ff7b72;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 123, 114, 0.1);
    border-color: #ff7b72;
}

/* === AUTH MODAL === */
.auth-modal-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2500;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.auth-modal-wrap.active {
    display: flex;
}

.auth-modal {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

.lock-icon {
    width: 80px;
    height: 80px;
    background: rgba(46, 160, 67, 0.1);
    color: var(--primary-color);
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.btn-google {
    background: #fff;
    color: #333;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    transition: 0.2s;
    text-decoration: none;
}

/* === ANIMATIONS === */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================ */
/* MOBİL UYUMLULUK - RESPONSIVE TASARIM        */
/* ============================================ */

@media (max-width: 1024px) {
    .filter-body {
        grid-template-columns: 1fr;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    /* Header */
    header {
        flex-wrap: wrap;
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .search-area {
        order: 3;
        width: 100%;
        flex-direction: column;
        margin-top: 10px;
    }

    .search-input,
    .btn-filter-trigger {
        height: 44px;
        font-size: 0.9rem;
    }

    .btn-filter-trigger {
        width: 100%;
        justify-content: center;
    }

    .header-controls {
        gap: 8px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
    }

    .btn-login {
        height: 36px;
        padding: 0 15px;
        font-size: 0.85rem;
    }

    .btn-login i {
        display: none;
    }

    /* Container */
    .container {
        padding: 1rem;
    }

    /* Hero */
    .campus-hero {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }

    .campus-hero-content {
        max-width: 100%;
    }

    .campus-hero h1 {
        font-size: 2rem;
    }

    .campus-hero p {
        font-size: 1rem;
    }

    .campus-hero i.fa-laptop-code {
        font-size: 5rem !important;
        margin-top: 20px;
    }

    /* Grid */
    .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .grid-header h2 {
        font-size: 1.3rem !important;
    }

    .grid-header select {
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Card */
    .card-thumb {
        height: 160px;
    }

    .card-body {
        padding: 1.2rem;
    }

    .card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .stats {
        width: 100%;
        justify-content: space-between;
    }

    /* Filter Modal */
    .filter-modal-overlay {
        padding-top: 0;
        align-items: flex-end;
    }

    .filter-panel {
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
    }

    .filter-body {
        padding: 20px;
    }

    .filter-footer {
        flex-direction: column;
        gap: 10px;
    }

    .btn-apply,
    .btn-clear {
        width: 100%;
    }

    /* Detail Modal - Mobile Optimized */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }

    .modal-header {
        padding: 15px !important;
    }

    .close-btn {
        top: 15px !important;
        right: 15px !important;
        width: 32px !important;
        height: 32px !important;
    }

    .modal-title-area h2 {
        font-size: 1.3rem !important;
        padding-right: 40px;
    }

    .modal-subtitle {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 0.85rem;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        padding: 20px !important;
        order: 2;
    }

    .modal-sidebar {
        order: 1;
        padding: 20px !important;
        background: var(--surface-color) !important;
    }

    .gallery-wrapper {
        height: 250px !important;
        border-radius: 12px !important;
        margin-bottom: 20px !important;
    }

    .gallery-nav {
        padding: 10px 14px !important;
        font-size: 1rem !important;
    }

    .tab-menu {
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0;
    }

    .tab-menu::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 12px 20px !important;
        white-space: nowrap;
        flex: 1;
        text-align: center;
    }

    .code-block {
        font-size: 0.85rem;
        padding: 12px;
        overflow-x: auto;
    }

    .edu-action-card {
        padding: 15px;
    }

    .btn-download-edu {
        padding: 14px;
        font-size: 1rem;
    }

    .stat-pill {
        padding: 10px 14px;
    }

    .rating-stars i {
        font-size: 1.8rem !important;
    }

    /* Auth Modal */
    .auth-modal {
        width: 90%;
        padding: 30px 20px;
    }

    .lock-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 360px) {
    .campus-hero h1 {
        font-size: 1.7rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .modal-title-area h2 {
        font-size: 1.1rem !important;
    }
}

/* --- MUHKEM KARE MODAL YAPISI --- */
.modal-container {
    width: 960px !important; /* Genişlik daraltıldı */
    max-width: 95%;
    height: 88vh !important; /* Kareye daha yakın olması için boy ayarlandı */
    border-radius: 24px;
    overflow: hidden !important; /* Dış scrollbar mühürlendi */
    display: flex;
    flex-direction: column;
}

.modal-body {
    display: flex;
    flex: 1;
    overflow: hidden; /* İç paneller bağımsız kayacak */
}

/* Sol Taraf: Galeri ve Açıklama */
.modal-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Sağ Taraf: Kimlik ve Aksiyonlar */
.modal-sidebar {
    width: 360px !important; /* Sabit dar genişlik */
    background: rgba(15, 23, 42, 0.4);
    border-left: 1px solid var(--border-color);
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar, .modal-sidebar::-webkit-scrollbar {
    display: none; /* Temiz görünüm için scrollbar gizleme */
}

/* ============================================ */
/* MOBİL DÜZELTME YAMASI (EN ALTA EKLENECEK)    */
/* ============================================ */

@media (max-width: 992px) {
    /* 1. Konteyner Genişliğini ve Yüksekliğini Serbest Bırak */
    .modal-container {
        width: 95% !important;       /* Sabit 960px yerine ekranın %95'i */
        height: auto !important;     /* Sabit yükseklik yerine içeriğe göre uzasın */
        max-height: 90vh !important; /* Ekran boyunu taşmasın */
        border-radius: 16px !important;
        overflow-y: auto !important; /* Mobilde ana kutu scroll olsun */
        display: flex !important;
        flex-direction: column !important;
    }

    /* 2. İç Gövdeyi Alt Alta Sırala */
    .modal-body {
        flex-direction: column !important; /* Yanyana değil alt alta */
        height: auto !important;
        overflow: visible !important; /* İç scrolları iptal et */
    }

    /* 3. Sol Taraf (İçerik) Ayarları */
    .modal-content {
        width: 100% !important;
        height: auto !important;
        padding: 20px !important;
        overflow: visible !important;
        order: 1; /* Mobilde üstte görünsün */
    }

    /* 4. Sağ Taraf (Sidebar) Ayarları */
    .modal-sidebar {
        width: 100% !important; /* Sabit 360px yerine tam genişlik */
        height: auto !important;
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 20px !important;
        overflow: visible !important;
        order: 2; /* Mobilde altta görünsün */
        background: var(--surface-color) !important; /* Arka planı düzelt */
    }

    /* 5. Galeri Yüksekliğini Mobilde Küçült */
    .gallery-wrapper {
        height: 220px !important; /* Mobilde dev gibi resim olmasın */
    }

    /* 6. Gereksiz Scrollbarları Gizle */
    .modal-content::-webkit-scrollbar,
    .modal-sidebar::-webkit-scrollbar {
        display: none;
    }

    /* 7. Başlık Alanını Düzenle */
    .modal-header {
        padding: 15px 20px !important;
    }

    .modal-title-area h2 {
        font-size: 1.4rem !important;
        line-height: 1.3;
        padding-right: 30px;
    }
}

