 :root {
            --bg-grad: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
            --sidebar-bg: rgba(255, 255, 255, 0.95);
            --card-bg: #ffffff;
            --primary: #8e44ad;
            --accent-blue: #3498db;
            --accent-pink: #e91e63;
            --accent-green: #2ecc71;
            --accent-yellow: #f1c40f;
            --text-main: #2c3e50;
        }

        * { box-sizing: border-box; user-select: none; -webkit-tap-highlight-color: transparent; }
        
        body { 
            margin: 0; background: var(--bg-grad); color: var(--text-main); 
            font-family: 'Nunito', sans-serif; overflow: hidden; height: 100vh;
        }

        .hidden { display: none !important; }
       
        #toast-box { position: fixed; top: 20px; right: 20px; z-index: 7000; }
        .toast {
            background: white; padding: 15px 25px; border-radius: 50px; margin-bottom: 10px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 10px;
            font-weight: 800; transform: translateX(120%); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .toast.show { transform: translateX(0); }
       
        #login-overlay {
            position: fixed; inset: 0; background: rgba(255,255,255,0.85); z-index: 5000;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            backdrop-filter: blur(10px);
        }
        .login-card {
            background: white; padding: 40px; border-radius: 30px;
            box-shadow: 0 20px 60px rgba(142, 68, 173, 0.2); text-align: center; width: 500px; max-width: 90%;
            border: 4px solid white;
        }
        h1 { font-family: 'Baloo 2'; font-weight: 800; font-size: 2.5rem; color: var(--primary); margin: 0; line-height: 1; }
        
        input, select {
            width: 100%; padding: 15px; margin: 15px 0; border: 2px solid #eee;
            border-radius: 15px; font-size: 1.1rem; text-align: center; outline: none; 
            font-family: 'Nunito'; background: #f9f9f9; transition: 0.3s;
        }
        input:focus { border-color: var(--accent-blue); background: white; transform: scale(1.02); }

        .btn-fun {
            width: 100%; padding: 15px; border: none; border-radius: 15px;
            font-family: 'Baloo 2'; font-size: 1.2rem; font-weight: 800; cursor: pointer;
            transition: 0.2s; color: white; margin-top: 5px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }
        .btn-primary { background: linear-gradient(45deg, #8e44ad, #9b59b6); }
        .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(142, 68, 173, 0.3); }
        
        .layout { display: grid; grid-template-columns: 280px 1fr; height: 100vh; }
       
        .sidebar {
            background: var(--sidebar-bg); 
            padding: 20px; display: flex; flex-direction: column; gap: 10px;
            transition: 0.4s ease; z-index: 10;
            position: relative;
            border-right: 1px solid rgba(0,0,0,0.05);
        }
        
        .sidebar.locked {
            pointer-events: none; 
            opacity: 1; 
        }
          
.sidebar.locked::after {
    content: '🔒 SİSTEM KİLİTLİ';
    position: absolute;
    top: 50%; 
    left: 50%;    
    
    transform: translate(-50%, -50%) rotate(-10deg);    
    white-space: nowrap;   
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    color: #ffffff;     
    padding: 15px 40px;  
    border-radius: 50px; 
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;  
    letter-spacing: 1px;   
    border: 2px solid rgba(255, 255, 255, 0.15);    
    box-shadow: 0 15px 30px rgba(0,0,0,0.6); 
    z-index: 20;
    animation: floatBlackBadge 3s ease-in-out infinite;
}


   @keyframes floatBlackBadge {
    0%, 100% {        
        transform: translate(-50%, -50%) rotate(-10deg);
        box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    } 
    50% {          
        transform: translate(-50%, -60%) rotate(-10deg) scale(1.05);
        box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    } 
}
        
        .cat-title { font-size: 0.8rem; font-weight: 800; color: #aaa; margin-top: 15px; letter-spacing: 1px; text-transform: uppercase; }

        .action-btn {
            width: 100%; padding: 12px; border-radius: 15px; border: none; cursor: pointer;
            text-align: left; font-weight: 700; color: #555; background: white;
            box-shadow: 0 3px 10px rgba(0,0,0,0.05); transition: 0.2s;
            display: flex; justify-content: space-between; align-items: center; border: 2px solid transparent;
        }
        .action-btn:hover { transform: scale(1.02); }
        
        .btn-neg { border-left: 5px solid var(--accent-pink); }
        .btn-neg:hover { background: #fff0f5; color: var(--accent-pink); }
        
        .btn-pos { border-left: 5px solid var(--accent-green); }
        .btn-pos:hover { background: #f0fff4; color: var(--accent-green); }

        .btn-reset { background: #ffebee; color: var(--accent-pink); text-align: center; justify-content: center; }
        .btn-lock { background: #eceff1; color: #607d8b; text-align: center; justify-content: center; }
       
        .dashboard { padding: 30px; display: flex; flex-direction: column; position: relative; }
      
        .header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
            background: rgba(255,255,255,0.6); backdrop-filter: blur(10px);
            padding: 15px 25px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
        }
        .title-group h1 { font-size: 2rem; color: var(--primary); margin: 0; }
        .status-badge { 
            font-size: 0.8rem; font-weight: 800; padding: 6px 15px; border-radius: 20px; 
            background: #eee; color: #aaa; margin-left: 10px; display: inline-block;
        }
        .status-badge.active { background: #d1fae5; color: var(--accent-green); }
        
        .diff-box { width: 400px; text-align: center; position: relative; }
        
        .diff-bar-container {
            height: 40px; 
            background: #e0e0e0; 
            border-radius: 20px; 
            margin: 5px 0; 
            overflow: hidden; 
            position: relative;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
            border: 2px solid white;
        }

        .diff-text-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem; font-weight: 800; color: white;
            text-shadow: 0 1px 3px rgba(0,0,0,0.6);
            z-index: 5;
            letter-spacing: 1px;
        }
       
        .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; overflow-y: auto; padding: 10px; }

        .card {
            background: white; border-radius: 25px; padding: 20px; text-align: center;
            box-shadow: 0 10px 25px rgba(0,0,0,0.05); transition: 0.3s; cursor: pointer;
            position: relative; border: 3px solid transparent;
            display: flex; flex-direction: column; align-items: center;
        }
        .card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
        
        .card.selected {
            border-color: var(--accent-blue);
            background: #f0f9ff;
            transform: scale(1.05);
            animation: pulseSelect 1.5s infinite;
        }
        @keyframes pulseSelect { 0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(52, 152, 219, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); } }
       
        .badge-real {
            width: 70px; height: 70px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 10px;
            font-size: 1.8rem; color: white;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            border: 3px solid white;
            position: relative;
        }
        .badge-real::after {
            content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
        }

        .b-gold { background: linear-gradient(135deg, #FFD700, #FDB931, #C49B06); text-shadow: 0 2px 2px #b8860b; }
        .b-silver { background: linear-gradient(135deg, #E0E0E0, #BDBDBD, #757575); text-shadow: 0 2px 2px #616161; }
        .b-bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); text-shadow: 0 2px 2px #5D4037; }
        .b-danger { background: linear-gradient(135deg, #e53935, #b71c1c); text-shadow: 0 2px 2px #7f0000; animation: shakeBadge 2s infinite; }
        @keyframes shakeBadge { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

        .s-name { font-weight: 700; color: #555; font-size: 1.1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; }
        .s-score { font-family: 'Baloo 2'; font-size: 2.2rem; line-height: 1; font-weight: 800; margin-top: 5px; }
        .sc-pos { color: var(--accent-green); }
        .sc-neg { color: var(--accent-pink); }
        .sc-neu { color: var(--accent-yellow); }
      
        #mobile-ui { height: 100vh; background: #2c3e50; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: white; }
        .big-btn {
            width: 200px; height: 200px; border-radius: 40px; background: var(--accent-green);
            color: white; font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
            box-shadow: 0 20px 0 #27ae60; cursor: pointer; transition: 0.2s; border: none;
        }
        .big-btn:active { transform: translateY(20px); box-shadow: 0 0 0 #27ae60; }
       
        .modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 6000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
        .modal-box { background: white; width: 500px; padding: 30px; border-radius: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }

.btn-danger { 
    background: linear-gradient(45deg, #e74c3c, #c0392b); /* Kırmızı Gradyan */
}

.btn-danger:hover { 
    transform: translateY(-3px);  
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.4);  
}

.modal-bg[style*="display: flex"] {
    animation: smoothBackdrop 0.4s ease-out forwards;
}

.modal-bg[style*="display: flex"] .modal-box {
    opacity: 0;   
    animation: smoothOpen 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes smoothBackdrop {
    0% { 
        background-color: rgba(0,0,0,0); 
        backdrop-filter: blur(0px);
    }
    100% { 
        background-color: rgba(0,0,0,0.4); 
        backdrop-filter: blur(5px);
    }
}

@keyframes smoothOpen {
    0% {
        opacity: 0;         
        transform: translateY(15px) scale(0.96); 
    }
    100% {
        opacity: 1;        
        transform: translateY(0) scale(1); 
    }
}


.always-active {
    pointer-events: auto !important; 
    z-index: 100;  
    position: relative;
    background: #e3f2fd;  
    color: #1976d2;
    border-left: 5px solid #1976d2;
}
.always-active:hover {
    background: #bbdefb;
    transform: scale(1.02);
}
 
.rules-list {
    text-align: left;
    margin-top: 15px;
    padding: 0 10px;
}
.rule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    color: #555;
}
.rule-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

@media screen and (max-width: 900px) {    
    body {
        overflow: auto !important;  
        height: auto !important;   
    }
   
    .layout {
        display: flex !important;
        flex-direction: column;
        height: auto !important;
    }
     
    .sidebar {
        width: 100% !important;  
        height: auto !important; 
        position: relative !important; 
        border-right: none !important;
        border-bottom: 2px solid rgba(0,0,0,0.1);
        padding-bottom: 20px;
        order: 2;  
    }
        
    .dashboard {
        width: 100% !important;
        padding: 15px !important;
        height: auto !important;
        overflow: visible !important;
        order: 1;  
    }
    
    .grid {
        display: grid;         
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px !important;
    }
     
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
         
    .sidebar.locked::after {         
        font-size: 0.9rem;
        padding: 10px 20px;
        transform: translate(-50%, -50%) rotate(0deg) !important;  
        white-space: normal;  
        text-align: center;
        width: 80%;
    }

.diff-box {
        width: 350px !important; 
        max-width: 100% !important; 
        margin: 0 auto !important; 
    }


}


@media screen and (max-width: 900px) {    
    .layout.hidden, .hidden {
        display: none !important;
    }   
    
    #login-overlay {
        background: #e0c3fc; 
        background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    }
}

.btn-change { 
    background: #fff8e1;  
    color: #f39c12;       
    border-left: none;    
}
.btn-change:hover {
    background: #fef9e7;
    color: #d35400;
}
 
@media screen and (max-width: 900px) {
    .action-btn {
        font-size: 0.8rem !important;  
        padding: 10px 2px !important;
    }
}


.side-by-side-buttons {
    display: flex;
    gap: 10px; 
    margin-top: 15px;  
}
 
.side-by-side-buttons button {
    flex: 1; 
    padding: 12px;
    font-size: 1rem;
}
 
.btn-secondary { 
    background: linear-gradient(45deg, #bdc3c7, #95a5a6); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.btn-secondary:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(149, 165, 166, 0.4); 
}

.btn-preview { 
    background: linear-gradient(45deg, #3498db, #2980b9); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.btn-preview:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4); 
} 
 
.social-buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;  
    margin-top: 25px;
}

.social-btn {
    padding: 12px 25px;
    border-radius: 15px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
 
.instagram-btn {    
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: 2px solid #fff;
}
.instagram-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 39, 67, 0.5);
}

.facebook-btn {
    background: linear-gradient(45deg, #4267B2, #3b5998);
    border: 2px solid #fff;
}
.facebook-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(66, 103, 178, 0.5);
}

@media screen and (max-width: 500px) {
    .side-by-side-buttons {
        flex-direction: column;
    }
    .social-buttons-container {
        flex-direction: column;
        width: 80%;  
        margin: 25px auto 0 auto;
    }
    .social-btn {
        justify-content: center;
    }
}

.sidebar {
    overflow-y: auto !important; 
    height: 100vh !important;   
    padding-bottom: 30px;        
}

.dashboard {
    height: 100vh !important;    
    overflow: hidden !important; 
    display: flex !important;    
    flex-direction: column;     
}
 
.grid {
    flex: 1;                    
    height: 100%;                
    overflow-y: auto !important;  
    min-height: 0;                
    padding-bottom: 150px !important;  
    align-content: start;         
}
 
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }
::-webkit-scrollbar-thumb { background: rgba(142, 68, 173, 0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(142, 68, 173, 0.8); }

@media screen and (max-width: 900px) {  
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
   
    .sidebar, .dashboard {
        width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }
    
    .action-btn {
        width: 100% !important;
        font-size: 0.85rem !important;  
        padding: 12px 8px !important;    
        white-space: nowrap !important;  
        overflow: hidden !important;
        text-overflow: ellipsis !important;  
    }
    
    .sidebar div[style*="display: flex"] {
        gap: 5px !important;
    }    
     
    .action-btn span {
        display: flex;
        align-items: center;
        gap: 5px;
    }
     
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;  
        gap: 8px !important;
        padding: 5px !important;
    }

    .card {
        width: 100% !important;
        min-width: 0 !important; 
    }
}

@media screen and (min-width: 901px) {   
    
    #bulk-modal .modal-box {
        width: 1000px !important;
        max-width: 95vw !important;        
        max-height: 90vh !important; 
        display: flex !important;
        flex-direction: column !important;
    }
    
    #checklist {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 8px !important;          
        max-height: 60vh !important; 
        overflow-y: auto !important; 
        margin-bottom: 15px !important;
        padding-right: 5px !important; 
        border: 1px solid #8e44ad !important;
    }
   
    #checklist > div {
        border: 1px solid #000 !important;
        background: #fcfcfc;
        border-radius: 6px;
        padding: 8px !important;
        font-size: 0.9rem !important;
        align-items: center;
    }
}

#bulk-modal .modal-box {
    padding: 25px !important;
}

#bulk-modal h2 {
    margin-top: 0 !important;
    margin-bottom: 10px !important; 
    font-size: 1.6rem !important; 
}

#bulk-modal p {
    margin-top: 0 !important;
    margin-bottom: 15px !important;  
    line-height: 1.4 !important;  
}
 
#checklist {
    margin-top: 10px !important;
    margin-bottom: 20px !important;  
}

#mobile-ui {
    background: radial-gradient(circle at center, #2b1055 0%, #150829 100%) !important;
    position: relative;
    overflow: hidden;
}

#mobile-ui::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    pointer-events: none;
}

#mob-control {
    position: relative;
    z-index: 2; 
    width: 100%;
    max-width: 450px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#mob-class-status {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.5rem !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #c471ed, #f64f59);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(196, 113, 237, 0.5);
    margin-bottom: 10px !important;
    font-weight: 800;
}

#instruction-text {
    font-family: 'Nunito', sans-serif;
    color: #a29bfe !important;
    font-size: 1.1rem !important;
    margin-bottom: 30px !important;
    font-weight: 600;
    opacity: 0.8;
}

#class-list-container {
    width: 100% !important;
    gap: 15px !important;
    perspective: 1000px;  
}

.class-control-btn {
    background: rgba(255, 255, 255, 0.05) !important; 
    backdrop-filter: blur(10px);  
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 6px solid #d946ef !important; 
    border-radius: 12px !important;
    padding: 20px 25px !important;    
    font-family: 'Baloo 2', sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: white !important;
    text-align: left !important;    
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;   
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.class-control-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(217, 70, 239, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.class-control-btn:hover {
    transform: translateY(-5px) scale(1.02) !important; 
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.4) 0%, rgba(41, 128, 185, 0.4) 100%) !important;
    box-shadow: 0 15px 30px rgba(217, 70, 239, 0.4) !important; 
    border-left-color: #00d2ff !important; 
}

.class-control-btn:hover::after {
    transform: translateX(100%); 
}

.class-control-btn:active {
    transform: scale(0.95) !important;
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.8) !important;
}

.class-control-btn span {
    display: flex;
    align-items: center;
    gap: 10px;
}

#mob-login input {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: white !important;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
#mob-login input::placeholder { color: #ccc; }

#mob-login .btn-primary {
    background: linear-gradient(45deg, #ff00cc, #333399) !important;
    box-shadow: 0 10px 20px rgba(51, 51, 153, 0.5) !important;
}