/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    padding: 2rem 0;
    text-align: center;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 1.1rem;
    color: #64748b;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    margin-bottom: 1.5rem;
}

.mobile-filter-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-filter-btn:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.mobile-filter-btn i:first-child {
    margin-right: 0.5rem;
    color: #6366f1;
}

.filter-count {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

.chevron {
    transition: transform 0.2s ease;
}

.mobile-filter-btn.active .chevron {
    transform: rotate(180deg);
}

/* Filter Sidebar */
.filter-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.filter-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-title i {
    color: #6366f1;
}

.filter-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.filter-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Filter Sections */
.filter-section {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.75rem;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.filter-section-toggle:hover {
    color: #0f172a;
}

.filter-section-toggle i {
    transition: transform 0.2s ease;
}

.filter-section-toggle.collapsed i {
    transform: rotate(-90deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-options.collapsed {
    max-height: 0;
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-option:hover {
    background: #f8fafc;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark, .radiomark {
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radiomark {
    border-radius: 50%;
}

.filter-option input:checked ~ .checkmark,
.filter-option input:checked ~ .radiomark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.filter-option input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-option input:checked ~ .radiomark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.option-text {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subject-icon {
    font-size: 1rem;
}

.option-count {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Content Area */
.content-area {
    flex: 1;
    min-width: 0;
}

/* Active Filters */
.active-filters {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.active-filters-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.active-filters-header h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-count-text {
    font-size: 0.75rem;
    color: #6b7280;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-tag.grade {
    background: #dbeafe;
    color: #1e40af;
}

.filter-tag.subject {
    background: #dcfce7;
    color: #166534;
}

.filter-tag.keyword {
    background: #f3e8ff;
    color: #7c3aed;
}

.filter-tag button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 50%;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tag.grade button:hover {
    background: rgba(30, 64, 175, 0.2);
}

.filter-tag.subject button:hover {
    background: rgba(22, 101, 52, 0.2);
}

.filter-tag.keyword button:hover {
    background: rgba(124, 58, 237, 0.2);
}

/* Results Summary */
.results-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.results-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.results-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.sort-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.grade-badge {
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.subject-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.subject-badge.matematik {
    background: #fef3c7;
    color: #92400e;
}

.subject-badge.fen {
    background: #d1fae5;
    color: #065f46;
}

.subject-badge.turkce {
    background: #fce7f3;
    color: #be185d;
}

.card-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
}

.card-stats {
    display: flex;
    gap: 1rem;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-date {
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .filter-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header-title {
        font-size: 2rem;
    }
    
    .main-content {
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-filter-toggle {
        display: block;
    }
    
    .filter-sidebar {
        width: 100%;
        display: none;
        margin-bottom: 1.5rem;
    }
    
    .filter-sidebar.show {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-tags {
        gap: 0.375rem;
    }
    
    .filter-tag {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
}

@media (max-width: 480px) {
    #ogrenci_foto{
       display:none;
    }
    .header-title {
        font-size: 1.75rem;
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .card-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.filter-tag {
    animation: fadeIn 0.3s ease;
}

/* Focus States */
.mobile-filter-btn:focus,
.clear-all-btn:focus,
.search-input:focus,
.filter-section-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.filter-option:focus-within {
    background: #f8fafc;
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}