/* Reset ve Temel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Login Sayfası */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

/* Form Elemanları */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Butonlar */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alert Mesajları */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid #667eea;
}

.sidebar-menu a .icon {
    margin-right: 12px;
    font-size: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5eb;
}

.page-header h1 {
    font-size: 28px;
    color: #333;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    color: #333;
}

.card-body {
    padding: 20px;
}

/* Tablolar */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e1e5eb;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #444;
}

table tr:hover {
    background: #f8f9fa;
}

table .actions {
    white-space: nowrap;
}

table .actions .btn {
    margin-right: 5px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
}

.stat-icon.blue { background: rgba(102, 126, 234, 0.1); color: #667eea; }
.stat-icon.green { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.stat-icon.orange { background: rgba(255, 152, 0, 0.1); color: #ff9800; }
.stat-icon.red { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.stat-icon.purple { background: rgba(156, 39, 176, 0.1); color: #9c27b0; }

.stat-info h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e5eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary { background: #667eea; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-warning { background: #ffc107; color: #333; }
.badge-danger { background: #dc3545; color: white; }
.badge-info { background: #17a2b8; color: white; }

/* Responsive - Tablet */
@media (max-width: 992px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .wrapper {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .page-header .btn {
        width: 100%;
        text-align: center;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        gap: 5px;
    }
    
    .sidebar-menu li {
        flex: 1;
        min-width: 70px;
        margin-bottom: 0;
    }
    
    .sidebar-menu a {
        padding: 10px 5px;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        font-size: 11px;
        border-radius: 8px;
        border-left: none !important;
    }
    
    .sidebar-menu a .icon {
        margin-right: 0;
        margin-bottom: 3px;
        font-size: 18px;
    }
    
    .logout-btn {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 10px;
        display: block;
    }
    
    .sidebar-header {
        padding: 12px;
    }
    
    .sidebar-header h2 {
        font-size: 16px;
    }
    
    .sidebar-header p {
        font-size: 10px;
    }
}

/* Responsive - Mobil */
@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-right: 12px;
    }
    
    .stat-info h3 {
        font-size: 22px;
    }
    
    .stat-info p {
        font-size: 12px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .card {
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    .card-body {
        padding: 15px;
    }
    
    table {
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 10px 6px;
    }
    
    table .actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
        white-space: normal;
    }
    
    table .actions .btn {
        margin-right: 0;
        padding: 10px 12px;
        width: 100%;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .btn-sm {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .login-box {
        padding: 25px 20px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .alert {
        font-size: 14px;
        padding: 12px;
    }
    
    .badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state .icon {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 16px;
    }
}

/* Touch-friendly - Dokunmatik ekranlar için */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
    }
    
    .sidebar-menu a {
        min-height: 48px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
    }
    
    table .actions .btn {
        min-height: 44px;
    }
    
    /* Daha büyük tıklama alanları */
    .form-group label {
        padding: 5px 0;
    }
}

/* Logout Button - Desktop */
@media (min-width: 993px) {
    .logout-btn {
        position: absolute;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
}

/* Form Row */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #444;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Category Colors */
.category-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* Difficulty Badge */
.difficulty-1 { background: #28a745; }
.difficulty-2 { background: #ffc107; }
.difficulty-3 { background: #dc3545; }