/* ====== MOBİLE STYLES - SADECE 768px ALTI ====== */

/* Mobile genel ayarlar */
@media screen and (max-width: 767px) {
    html {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    body {
        padding: 0;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
        min-height: 100vh;
    }
    
    .main-layout {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        gap: 0;
        width: 100%;
        position: relative;
    }
    
    .clock-panel {
        order: 1;
        flex: 1;
        min-height: 100vh;
        position: relative;
        transition: all 0.95s cubic-bezier(0.25, 0.1, 0.25, 1);
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100vw;
        padding: 30px 20px;
        box-sizing: border-box;
        overflow: visible;
        background: #f0f0f0;
        z-index: 1000;
    }
    
    .clock-container {
        position: static;
        transform: translateY(0) scale(1);
        width: min(80vw, 400px);
        height: min(80vw, 400px);
        max-width: 580px;
        max-height: 580px;
        flex-shrink: 0;
        margin: 0 auto;
        transform-origin: center center;
        /* SENKRONIZE TRANSITION - FORCE OVERRIDE ANA CSS */
        transition: transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
    }
    
    /* Panel açık durumu - genel mobil için */
    .panel-open .clock-container {
        transform: translateY(-6vh) scale(0.75);
    }
    
    .panel-open .clock-panel {
        align-items: flex-start;
        padding-top: 7vh;
        padding-bottom: 0;
        z-index: 1000;
        justify-content: center;
        transition: all 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
    }
    
    .controls-panel {
        position: fixed;
        bottom: -60%;
        left: 0;
        right: 0;
        height: 65%;
        background: white;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -15px 40px rgba(0,0,0,0.4), 0 -5px 15px rgba(0,0,0,0.2);
        z-index: 2000;
        transition: bottom 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
        overflow-y: auto;
        padding-top: 30px;
        flex: none;
        width: auto;
        order: auto;
        margin-top: 0;
        /* Force hardware acceleration */
        will-change: transform;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .controls-panel.panel-open {
        bottom: 0 !important;
    }
    
    /* Panel handle (drag indicator) */
    .controls-panel::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 6px;
        background: #ccc;
        border-radius: 3px;
        transition: all 0.3s ease;
        /* Pulse animation */
        animation: handlePulse 2s ease-in-out 4 0.5s both;
    }
    
    .controls-panel:hover::before {
        background: #666;
        width: 70px;
        animation: none;
    }
    
    @keyframes handlePulse {
        0%, 100% { 
            opacity: 0.6;
            transform: translateX(-50%) scaleX(1);
        }
        50% { 
            opacity: 1;
            transform: translateX(-50%) scaleX(1.1);
        }
    }
    
    /* Handle tıklanabilir alan */
    .controls-panel::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 35px;
        cursor: pointer;
        z-index: 2001;
    }
    
    /* Panel toggle butonu mobilde gizle */
    .panel-toggle {
        display: none !important;
    }
    
    /* Touch-friendly butonlar */
    .primary-btn, .secondary-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .session-btn {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 44px;
        border-radius: 6px;
    }
    
    .time-inputs input {
        padding: 10px 6px;
        font-size: 16px;
        min-height: 44px;
        box-sizing: border-box;
        border-radius: 6px;
        border: 1px solid #ddd;
    }
    
    .exam-selector select {
        padding: 10px 6px;
        font-size: 14px;
        min-height: 44px;
        box-sizing: border-box;
        border-radius: 6px;
        border: 1px solid #ddd;
        width: 100%;
    }
    
    /* Saat sayıları mobile optimizasyon */
    .number {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        font-weight: bold;
        color: #333;
    }
    
    /* Clock hover effectleri mobile'da kaldır */
    .clock:hover .hand {
        animation: none;
    }
}

/* Küçük mobil cihazlar */
@media screen and (max-width: 480px) {
    .clock-container {
        width: min(85vw, 320px);
        height: min(85vw, 320px);
    }
    
    .number {
        font-size: 20px;
        width: 28px;
        height: 28px;
    }
    
        .panel-open .clock-container {
        transform: translateY(-8vh) scale(0.7);
        /* Base transition kullanılır - timing tutarlı */
    }

    .panel-open .clock-panel {
        padding-top: 5vh;
        /* Transition override gerek yok, base transition kullanılır */
    }
}

/* Orta mobil cihazlar */
@media screen and (min-width: 481px) and (max-width: 767px) {
    .number {
        font-size: 24px;
        width: 32px;
        height: 32px;
    }
    
        .panel-open .clock-container {
        transform: translateY(-7vh) scale(0.73);
        /* Base transition kullanılır - timing tutarlı */
    }

    .panel-open .clock-panel {
        padding-top: 6vh;
        /* Transition override gerek yok, base transition kullanılır */
    }
} 

/* ====== LANDSCAPE MODE - DESKTOP GİBİ DAVRANSIN ====== */
@media screen and (max-width: 767px) and (orientation: landscape) {
    
    /* Panel'i tamamen gizle */
    .controls-panel {
        display: none !important;
    }
    
    /* Body ve main layout'u desktop gibi yap */
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .main-layout {
        flex-direction: row;
        height: auto;
        min-height: 100vh;
        overflow: auto;
        gap: 20px;
        padding: 20px;
    }
    
    /* Clock panel'i normal duruma getir */
    .clock-panel {
        order: 0;
        flex: 1;
        min-height: auto;
        height: auto;
        padding: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        background: transparent;
        transition: none;
    }
    
    /* Clock'u normal pozisyonuna getir */
    .clock-container {
        transform: translateY(0) scale(1) !important;
        width: min(60vw, 300px);
        height: min(60vw, 300px);
        transition: none !important;
        position: static;
    }
    
    /* Panel-open class etkilerini iptal et */
    .panel-open .clock-container {
        transform: translateY(0) scale(1) !important;
    }
    
    .panel-open .clock-panel {
        align-items: center !important;
        padding: 20px !important;
        padding-top: 20px !important;
        transition: none !important;
    }
    
    /* Saat sayıları landscape için optimize et */
    .number {
        font-size: 18px;
        width: 24px;
        height: 24px;
    }
    

} 