:root {
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: white;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: white;
    --border-color: #e0e0e0;
    --hover-shadow: rgba(0,0,0,0.1);
}

body.dark-mode {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --card-bg: #0f3460;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: white;
    --border-color: #2a2a3e;
    --hover-shadow: rgba(255,255,255,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
    padding: 15px 20px;
    position: relative;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.theme-toggle, .install-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1.5em;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover, .install-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.home-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2em;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.home-icon:hover {
    transform: scale(1.2);
}

header h1 {
    font-size: 2em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1em;
    opacity: 0.9;
}

.grade-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.grade-btn {
    background: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.grade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.grade-btn.active {
    background: #4CAF50;
    color: white;
}

.content {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px 25px 25px 25px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.welcome-message h2 {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.unit-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.unit-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.unit-card p {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.unit-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
}

.action-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-card {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    margin-bottom: 10px;
    margin-top: 0;
    transition: all 0.3s ease;
    display: block;
}

.back-btn:hover {
    background: #5568d3;
}

.unit-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    margin-top: 0;
    gap: 8px;
}

.unit-header-nav h2 {
    margin: 0 10px;
}

.unit-nav-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.unit-nav-btn:hover:not(.disabled) {
    background: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.unit-nav-btn:active:not(.disabled) {
    transform: scale(0.95);
}

.unit-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

body.dark-mode .unit-nav-btn {
    background: rgba(15, 52, 96, 0.9);
    color: #667eea;
    border-color: #667eea;
}

body.dark-mode .unit-nav-btn:hover:not(.disabled) {
    background: #667eea;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}



/* Image modal - tam ekran */
.modal.image-modal {
    padding: 0;
    align-items: center;
    justify-content: center;
    background: rgb(0, 0, 0);
}

.modal.image-modal .modal-content {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0;
    margin: 0;
    background: rgb(0, 0, 0);
}

.modal.image-modal #modalImage {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.modal-content {
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
}

.zoom-controls {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 6px;
    z-index: 2002;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
    cursor: default;
}

.zoom-controls[style*="left:"][style*="px"] {
    transform: none;
}

.drawing-tools {
    position: fixed;
    top: 95px;
    left: 30px;
    display: flex;
    flex-direction: row;
    gap: 4px;
    z-index: 2002;
    background: rgba(15, 15, 15, 0.85);
    padding: 4px 6px;
    border-radius: 8px;
    backdrop-filter: blur(15px);
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.drawing-tools.dragging {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    cursor: grabbing !important;
    transform: scale(1.02);
}

.drawing-drag-handle {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    cursor: grab;
    padding: 0 3px;
    display: flex;
    align-items: center;
    user-select: none;
    transition: color 0.3s ease;
    line-height: 1;
}

.drawing-drag-handle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.drawing-drag-handle:active {
    cursor: grabbing;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 13px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn.active {
    background: rgba(102, 126, 234, 0.8);
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.drawing-tools input[type="color"] {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.drawing-tools input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.drawing-tools input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.drawing-tools input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.drawing-tools input[type="color"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.brush-size-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brush-size-label {
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.drawing-tools input[type="range"] {
    width: 50px;
    height: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    background: transparent;
}

.drawing-tools input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    height: 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.drawing-tools input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    margin-top: -5px;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.drawing-tools input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.close-tools-btn {
    background: rgba(220, 53, 69, 0.2) !important;
    border-color: rgba(220, 53, 69, 0.4) !important;
}

.close-tools-btn:hover {
    background: rgba(220, 53, 69, 0.7) !important;
    border-color: #dc3545 !important;
}

.drawing-toggle-btn {
    position: fixed;
    top: 95px;
    left: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.drawing-toggle-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    border-color: #667eea;
    transform: scale(1.1);
}

/* Tam ekran modunda çizim araçları */
:fullscreen .drawing-tools,
:-webkit-full-screen .drawing-tools,
:-moz-full-screen .drawing-tools,
:-ms-fullscreen .drawing-tools {
    top: 115px;
    left: 50px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .drawing-tools {
        top: auto;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        flex-wrap: nowrap;
        max-width: 95vw;
        justify-content: center;
        padding: 4px 6px;
        gap: 3px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tool-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .drawing-tools input[type="color"] {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .drawing-tools input[type="range"] {
        width: 60px;
        height: 32px;
    }
    
    .brush-size-container {
        padding: 2px 4px;
        gap: 3px;
    }
    
    .brush-size-label {
        font-size: 9px;
        min-width: 16px;
    }

    .drawing-toggle-btn {
        top: auto;
        bottom: 15px;
        right: 15px;
        left: auto;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .drawing-drag-handle {
        display: none;
    }

    .zoom-controls {
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 8px;
        gap: 4px;
    }
    
    .zoom-controls button {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .zoom-drag-handle {
        font-size: 12px;
        padding: 0 4px;
    }

    .zoom-toggle-btn {
        bottom: 15px;
        left: 15px;
        right: auto;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .modal-nav-btn {
        display: none !important;
    }

    .exit-btn {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }

    .scroll-lock-btn {
        top: 15px;
        right: 70px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .fullscreen-btn {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .image-counter {
        top: 15px;
        left: 70px;
        font-size: 14px;
        padding: 6px 12px;
    }

    :fullscreen .drawing-tools,
    :-webkit-full-screen .drawing-tools,
    :-moz-full-screen .drawing-tools,
    :-ms-fullscreen .drawing-tools {
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
    }

    :fullscreen .drawing-toggle-btn,
    :-webkit-full-screen .drawing-toggle-btn,
    :-moz-full-screen .drawing-toggle-btn,
    :-ms-fullscreen .drawing-toggle-btn {
        bottom: 25px;
        right: 25px;
        left: auto;
    }

    :fullscreen .zoom-controls,
    :-webkit-full-screen .zoom-controls,
    :-moz-full-screen .zoom-controls,
    :-ms-fullscreen .zoom-controls {
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
    }

    :fullscreen .zoom-toggle-btn,
    :-webkit-full-screen .zoom-toggle-btn,
    :-moz-full-screen .zoom-toggle-btn,
    :-ms-fullscreen .zoom-toggle-btn {
        bottom: 25px;
        left: 25px;
        right: auto;
    }



    /* Unit actions mobile */
    .unit-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 0 10px;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .action-btn {
        flex: 1;
        min-width: 0;
        padding: 10px 4px;
        font-size: 0.7em;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        gap: 3px;
    }

    /* Images grid mobile */
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }

    /* Back button mobile */
    .back-btn {
        margin: 0 10px 15px 10px;
        width: calc(100% - 20px);
    }

    /* Unit header navigation mobile */
    .unit-header-nav {
        flex-wrap: wrap;
        padding: 0 10px;
    }

    .unit-header-nav h2 {
        font-size: 1.2em;
        text-align: center;
        width: 100%;
        order: -1;
        margin-bottom: 10px;
    }

    .unit-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Grade selector mobile */
    .grade-selector {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        padding: 0 10px;
        justify-content: space-between;
    }

    .grade-btn {
        flex: 1;
        min-width: 0;
        padding: 12px 8px;
        font-size: 0.95em;
    }

    /* Unit cards mobile */
    .units-container,
    .units-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }

    .unit-card {
        padding: 15px;
    }

    /* Welcome message mobile */
    .welcome-message {
        padding: 40px 15px;
    }

    .welcome-message h2 {
        font-size: 1.5em;
    }

    /* Content padding mobile */
    .content {
        padding: 20px 15px;
        border-radius: 10px;
    }

    /* Header mobile */
    header {
        padding: 12px 15px;
        margin-bottom: 15px;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    header h1 {
        font-size: 1.4em;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    header p {
        display: none;
    }

    .header-actions {
        position: static;
        transform: none;
        gap: 8px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .install-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .home-icon {
        position: static;
        transform: none;
        font-size: 1.8em;
        margin: 0;
    }
}

/* Tablet responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .unit-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 150px;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .units-container,
    .units-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Tam ekran modunda zoom kontrolleri */
:fullscreen .zoom-controls,
:-webkit-full-screen .zoom-controls,
:-moz-full-screen .zoom-controls,
:-ms-fullscreen .zoom-controls {
    bottom: 50px;
    left: 50px;
}

.zoom-controls[style*="left:"][style*="px"] {
    transform: none;
}

.zoom-controls.dragging {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    cursor: grabbing !important;
}

.zoom-drag-handle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: grab;
    padding: 0 8px;
    display: flex;
    align-items: center;
    user-select: none;
    transition: color 0.3s ease;
}

.zoom-drag-handle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.zoom-drag-handle:active {
    cursor: grabbing;
}

.zoom-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 15px;
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.zoom-controls button:hover {
    background: rgba(102, 126, 234, 0.8);
    border-color: #667eea;
    transform: scale(1.1);
}

.zoom-controls button:active {
    transform: scale(0.95);
}

.zoom-close-btn {
    background: rgba(220, 53, 69, 0.3) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
}

.zoom-close-btn:hover {
    background: rgba(220, 53, 69, 0.8) !important;
    border-color: #dc3545 !important;
}

.zoom-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.zoom-toggle-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    border-color: #667eea;
    transform: scale(1.1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ccc;
}

.exit-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2003;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.exit-btn:hover {
    background: rgba(220, 53, 69, 0.9);
    border-color: #dc3545;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.5);
}

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

.scroll-lock-btn {
    position: absolute;
    top: 20px;
    right: 160px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2003;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.scroll-lock-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

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

.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 100px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2003;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

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

/* Tam ekran modunda butonlar */
:fullscreen .exit-btn,
:-webkit-full-screen .exit-btn,
:-moz-full-screen .exit-btn,
:-ms-fullscreen .exit-btn {
    top: 50px;
    left: 50px;
}

:fullscreen .scroll-lock-btn,
:-webkit-full-screen .scroll-lock-btn,
:-moz-full-screen .scroll-lock-btn,
:-ms-fullscreen .scroll-lock-btn {
    top: 40px;
    right: 180px;
}

:fullscreen .fullscreen-btn,
:-webkit-full-screen .fullscreen-btn,
:-moz-full-screen .fullscreen-btn,
:-ms-fullscreen .fullscreen-btn {
    top: 40px;
    right: 120px;
}

:fullscreen .close-modal,
:-webkit-full-screen .close-modal,
:-moz-full-screen .close-modal,
:-ms-fullscreen .close-modal {
    top: 40px;
    right: 60px;
}

.modal-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: all 0.3s ease;
  z-index: 2002;
  backdrop-filter: blur(10px);
}

.modal-nav-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.9);
  border-color: #667eea;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.modal-nav-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-nav-btn.modal-prev {
  left: 30px;
}

.modal-nav-btn.modal-next {
  right: 30px;
}

/* Tam ekran modunda oklar */
:fullscreen .modal-nav-btn.modal-prev,
:-webkit-full-screen .modal-nav-btn.modal-prev,
:-moz-full-screen .modal-nav-btn.modal-prev,
:-ms-fullscreen .modal-nav-btn.modal-prev {
  left: 50px;
}

:fullscreen .modal-nav-btn.modal-next,
:-webkit-full-screen .modal-nav-btn.modal-next,
:-moz-full-screen .modal-nav-btn.modal-next,
:-ms-fullscreen .modal-nav-btn.modal-next {
  right: 50px;
}

.modal-nav-btn span {
  display: block;
  line-height: 1;
}

/* Image counter */
.image-counter {
  position: fixed;
  top: 30px;
  left: 95px;
  color: white;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 20px;
  border-radius: 20px;
  z-index: 2003;
  backdrop-filter: blur(10px);
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Tam ekran modunda resim sayacı */
:fullscreen .image-counter,
:-webkit-full-screen .image-counter,
:-moz-full-screen .image-counter,
:-ms-fullscreen .image-counter {
  top: 50px;
  left: 115px;
}

/* Video Modal Styles */
.video-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.video-modal-header h2 {
    color: var(--text-primary);
    font-size: 1.5em;
}

.video-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.video-close:hover {
    color: var(--text-primary);
}

.video-list {
    display: grid;
    gap: 15px;
    padding: 24px;
    padding-top: 50px;
    max-height: 550px;
    overflow-y: auto;
}

.video-item {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #667eea;
}

.video-item:hover {
    background: #f8f9fa;
    border-left-color: #764ba2;
    transform: translateX(4px);
}

.video-item h4 {
    color: #2d3748;
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.video-item p {
    color: #718096;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

.video-player-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.video-player-container iframe {
    width: 100%;
    height: 480px;
    border: none;
}

.no-videos {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
}

.no-videos p {
    font-size: 1.1em;
    margin-top: 15px;
    line-height: 1.6;
}

.simulation-modal .no-videos {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 15px;
    margin: 20px;
    padding: 60px 40px;
}

/* Simulation Modal Styles */
.simulation-modal {
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.simulation-modal .modal-content,
.video-modal .modal-content,
.notes-modal .modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0;
    max-width: 700px;
    width: auto;
    min-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10000;
    margin: 0 auto;
}

.simulation-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s;
}

.simulation-close:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
    transform: rotate(90deg);
}

.simulation-modal .modal-header,
.video-modal .modal-header,
.notes-modal .modal-header {
    display: none !important;
}

.simulation-modal .close-modal {
    color: white;
    font-size: 36px;
    opacity: 0.9;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.simulation-modal .close-modal:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Simulation Styles */
.simulation-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 550px;
    overflow-y: auto;
    padding: 24px;
    padding-top: 50px;
}

/* Simulation Accordion */
.simulation-accordion {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.simulation-accordion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    user-select: none;
}

.simulation-accordion-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.accordion-icon {
    font-size: 1.8em;
}

.accordion-text {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.accordion-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 8px;
}

.accordion-arrow {
    color: white;
    font-size: 1.2em;
    transition: transform 0.3s;
}

.simulation-accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.simulation-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.simulation-accordion-content.active {
    max-height: 2000px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.simulation-list::-webkit-scrollbar {
    width: 8px;
}

.simulation-list::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.simulation-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.simulation-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5568d3 0%, #6a3f8f 100%);
}

.simulation-item {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #667eea;
    margin-bottom: 12px;
}

.simulation-item:last-child {
    margin-bottom: 0;
}

.simulation-item:hover {
    background: #f8f9fa;
    border-left-color: #764ba2;
    transform: translateX(4px);
}

.simulation-item h4 {
    color: #2d3748;
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.simulation-item p {
    color: #718096;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .simulation-item {
        padding: 16px 20px;
    }
    
    .simulation-item h4 {
        font-size: 1em;
    }
    
    .accordion-text {
        font-size: 1em;
    }
}

/* Dark mode support */
body.dark-mode .simulation-accordion {
    background: #2d3748;
}

body.dark-mode .simulation-accordion-content {
    background: #1a202c;
}

body.dark-mode .simulation-item {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .simulation-item:hover {
    background: #374151;
    border-left-color: #667eea;
}

body.dark-mode .simulation-item h4 {
    color: #e2e8f0;
}

body.dark-mode .simulation-item p {
    color: #a0aec0;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.share-modal h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.copy {
    background: #667eea;
    color: white;
}

.share-btn.qr {
    background: #764ba2;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.share-link {
    background: rgba(102, 126, 234, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    word-break: break-all;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-align: center;
}

#qrcode {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* PDF Download Button */
.pdf-download-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
}

.pdf-download-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-actions {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .video-player-container iframe {
        height: 250px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
}

/* Bildirim Mobil Uyumluluk */
@media (max-width: 768px) {
    .custom-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px) !important;
        font-size: 14px !important;
        padding: 15px 20px !important;
    }
}

/* Notlar Modal */
.notes-list {
    display: grid;
    gap: 15px;
    padding: 24px;
    padding-top: 50px;
    max-height: 550px;
    overflow-y: auto;
    margin-top: 20px;
}

.note-item {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 15px;
}

.note-item:hover {
    background: #f8f9fa;
    border-left-color: #764ba2;
    transform: translateX(4px);
}

.note-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.note-info {
    flex: 1;
}

.note-info h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1em;
}

.note-info p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.5;
}

.note-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.note-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.note-download {
    font-size: 1.8em;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.3s;
}

.note-item:hover .note-download {
    opacity: 1;
    transform: scale(1.2);
}

/* Mobil uyumluluk */
@media (max-width: 768px) {
    .note-item {
        flex-direction: column;
        text-align: center;
    }
    
    .note-meta {
        justify-content: center;
    }
}
