/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
    color: white;
}

.btn:active {
    transform: translateY(3px);
    box-shadow: none;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.2rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 0 #4834d4;
}

.btn-success {
    background: var(--success);
    box-shadow: 0 4px 0 #008f72;
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 4px 0 #d63031;
}

.btn-warning {
    background: var(--warning);
    color: #4a3b1a;
    box-shadow: 0 4px 0 #e1b12c;
}

.btn-glow {
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-glow:active {
    transform: scale(0.95);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Login Screen */
.login-wrapper {
    background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.role-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 400px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Teacher Layout */
.teacher-layout {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 200px;
    background: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    z-index: 10;
}

.sidebar-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 14px;
    cursor: pointer;
    color: #64748b; /* slate-500 */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

.sidebar-item:hover {
    background: #f1f5f9; /* slate-100 */
    color: #1e293b; /* slate-800 */
    transform: translateX(4px);
}

.sidebar-item.active {
    background: #f8fafc; /* slate-50 (çok hafif gri) */
    color: #4f46e5; /* indigo-600 */
    border-left-color: #4f46e5;
    font-weight: 900;
}

.sidebar-item.active i {
    color: #4f46e5;
}

/* Özel Başlat Butonu Stili */
.sidebar-special {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: white !important;
    margin: 12px 0;
    padding: 16px !important;
    border-left: none !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.sidebar-special i {
    color: white !important;
}

.sidebar-special:hover {
    transform: scale(1.03) translateY(-2px) !important;
    filter: brightness(1.1);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    color: white !important;
}

.sidebar-special.active {
    filter: brightness(1.1);
    box-shadow: 0 0 0 2px white, 0 0 20px rgba(79, 70, 229, 0.5);
    transform: scale(1.03);
}

.sidebar-special.active::after {
    content: '•';
    position: absolute;
    right: 16px;
    font-size: 20px;
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #fdfdfd;
}

/* Cards */
.panel-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    color: #2d3436;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
}

/* Game Header */
.game-header {
    padding: 15px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.streak-badge {
    background: var(--warning);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 800;
    color: #4a3b1a;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Question Display */
.question-container {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.q-text {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    color: var(--bg-dark);
}

/* Answer Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

.opt-btn {
    height: 100px;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.1s;
}

.opt-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.bg-red {
    background: var(--danger);
}

.bg-blue {
    background: #54a0ff;
}

.bg-yellow {
    background: var(--warning);
}

.bg-green {
    background: var(--success);
}

/* Matching Game */
.match-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.match-item {
    background: white;
    border: 3px solid #dfe6e9;
    padding: 20px;
    text-align: center;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.match-item.selected {
    border-color: var(--primary);
    background: #eef2ff;
    transform: scale(1.05);
}

.match-item.matched {
    border-color: #047857;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    opacity: 1;
    pointer-events: none;
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.match-cols-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.match-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-item-new {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 3px solid #dfe6e9;
    text-align: center;
    font-weight: 700;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-item-new.selected {
    border-color: #6c5ce7;
    background: #e0e7ff;
}

.match-item-new.matched {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #047857;
    color: white;
    opacity: 1;
    pointer-events: none;
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Timer */
.timer-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.timer-fill {
    height: 100%;
    background: var(--warning);
    width: 100%;
    transition: width 1s linear;
}

/* Report Cards */
.report-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.report-card:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modal Tabs */
.modal-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid transparent;
}

.modal-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.modal-tab-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: rgb(165, 180, 252);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Responsive */
@media(max-width: 768px) {
    .teacher-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }

    .sidebar-item {
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}