/* Ten rengi temasi ve el yazısı fontlar */
:root {
    --primary-skin: #F5DEB3;      /* Buğday rengi */
    --secondary-skin: #DDBEA9;    /* Daha koyu ten */
    --tertiary-skin: #CB997E;     /* Bronz ten */
    --dark-skin: #A0785A;         /* Koyu kahverengi */
    --accent-color: #8B4513;      /* Saddle brown */
    --text-dark: #5D4E37;         /* Koyu kahve */
    --text-light: #8B7355;        /* Açık kahve */
    --white: #FEFCF3;             /* Krem beyaz */
    --shadow: rgba(139, 69, 19, 0.1);
    --hover-shadow: rgba(139, 69, 19, 0.2);
    
    /* Handwriting fonts */
    --font-handwriting: 'Caveat', cursive;
    --font-casual: 'Kalam', cursive;
}

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

body {
    font-family: var(--font-casual);
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-skin) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" fill="%23CB997E" stroke="%238B4513" stroke-width="2"/><circle cx="12" cy="12" r="3" fill="%238B4513"/></svg>') 12 12, auto;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* iPhone viewport fix */
@supports (-webkit-touch-callout: none) {
    .app-container {
        min-height: -webkit-fill-available;
    }
}

/* Header Styles */
.header {
    background: var(--secondary-skin);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow);
    border-bottom: 3px solid var(--tertiary-skin);
    position: relative;
}

/* iPhone Safe Area Header Support */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(1rem, calc(1rem + env(safe-area-inset-top)));
        padding-left: max(1rem, calc(1rem + env(safe-area-inset-left)));
        padding-right: max(1rem, calc(1rem + env(safe-area-inset-right)));
        min-height: calc(70px + env(safe-area-inset-top));
    }
}

/* Hamburger Menu */
.hamburger-menu {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: var(--tertiary-skin);
    color: var(--white);
    transform: scale(1.1);
}

.hamburger-menu.active {
    background: var(--accent-color);
    color: var(--white);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: var(--accent-color);
    transform: rotate(-15deg);
}

.logo h1 {
    font-family: var(--font-handwriting);
    font-size: 2.5rem;
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 2px 2px 4px var(--shadow);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Button Styles */
.btn {
    background: var(--tertiary-skin);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="6" fill="%23F5DEB3" stroke="%238B4513" stroke-width="2"/><path d="M10 6 L10 14 M6 10 L14 10" stroke="%238B4513" stroke-width="2"/></svg>') 10 10, pointer;
    font-family: var(--font-casual);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    box-shadow: 0 3px 6px var(--shadow);
}

.btn:hover {
    background: var(--dark-skin);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--hover-shadow);
}

.btn-new {
    background: var(--accent-color);
    color: var(--white);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--primary-skin);
    border-right: 3px solid var(--secondary-skin);
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 2px 0 10px var(--shadow);
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* iPhone Safe Area Sidebar Support */
@supports (padding: max(0px)) {
    .sidebar {
        padding-top: max(1.5rem, calc(1.5rem + env(safe-area-inset-top)));
        padding-left: max(1.5rem, calc(1.5rem + env(safe-area-inset-left)));
        padding-bottom: max(1.5rem, calc(1.5rem + env(safe-area-inset-bottom)));
    }
}

.sidebar.hidden {
    transform: translateX(-100%);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--secondary-skin);
    border-radius: 20px;
    font-family: var(--font-casual);
    font-size: 1rem;
    background: var(--white);
    color: var(--text-dark);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle cx="6" cy="6" r="4" fill="none" stroke="%238B4513" stroke-width="2"/><path d="M10 10 L14 14" stroke="%238B4513" stroke-width="2"/><circle cx="6" cy="6" r="1" fill="%23CB997E"/></svg>') 8 8, text;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--shadow);
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Categories */
.categories h3 {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-align: center;
}

.category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 15px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="7" fill="%23F5DEB3" stroke="%238B4513" stroke-width="2"/><path d="M6 9 L8 11 L12 7" stroke="%238B4513" stroke-width="2" fill="none"/></svg>') 9 9, pointer;
    transition: all 0.3s ease;
    background: var(--white);
    border: 2px solid transparent;
}

.category:hover {
    background: var(--secondary-skin);
    border-color: var(--tertiary-skin);
    transform: translateX(5px);
}

.category.active {
    background: var(--tertiary-skin);
    color: var(--white);
    border-color: var(--accent-color);
}

.category .count {
    margin-left: auto;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Notes List */
.notes-list {
    margin-top: 2rem;
}

.note-item {
    background: var(--white);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect x="3" y="3" width="14" height="14" rx="3" fill="%23DDBEA9" stroke="%238B4513" stroke-width="1.5"/><path d="M7 8 L13 8 M7 10 L13 10 M7 12 L10 12" stroke="%238B4513" stroke-width="1"/></svg>') 10 10, pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px var(--shadow);
}

.note-item:hover {
    border-color: var(--tertiary-skin);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--hover-shadow);
}

.note-item.active {
    border-color: var(--accent-color);
    background: var(--primary-skin);
}

.note-item h4 {
    font-family: var(--font-handwriting);
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.note-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Editor Area */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.editor-header {
    padding: 1.5rem;
    background: var(--primary-skin);
    border-bottom: 2px solid var(--secondary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-title {
    flex: 1;
    border: none;
    font-family: var(--font-handwriting);
    font-size: 2rem;
    color: var(--accent-color);
    background: transparent;
    outline: none;
    font-weight: 600;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="22" viewBox="0 0 18 22"><path d="M3 20 L9 3 L15 5 L11 20 Z" fill="%23DDBEA9" stroke="%238B4513" stroke-width="1.5"/><circle cx="9" cy="4" r="2.5" fill="%238B4513"/><path d="M9 3 L9 7" stroke="%23F5DEB3" stroke-width="1.5"/></svg>') 9 11, text;
}

.note-title::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.category-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--secondary-skin);
    border-radius: 15px;
    font-family: var(--font-casual);
    background: var(--white);
    color: var(--text-dark);
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="2" y="4" width="12" height="8" rx="2" fill="%23DDBEA9" stroke="%238B4513" stroke-width="1.5"/><path d="M6 7 L8 9 L10 7" stroke="%238B4513" stroke-width="1.5" fill="none"/></svg>') 8 8, pointer;
}

/* Toolbar */
.toolbar {
    padding: 1rem 1.5rem;
    background: var(--secondary-skin);
    border-bottom: 2px solid var(--tertiary-skin);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.format-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-tool {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--tertiary-skin);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="6" fill="%23CB997E" stroke="%238B4513" stroke-width="2"/><path d="M6 9 L12 9" stroke="%238B4513" stroke-width="2"/><circle cx="9" cy="9" r="2" fill="%238B4513"/></svg>') 9 9, pointer;
}

.btn-tool:hover {
    background: var(--tertiary-skin);
    color: var(--white);
}

.btn-tool.active {
    background: var(--accent-color);
    color: var(--white);
}



/* Editor Container */
.editor-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.note-editor {
    min-height: 100%;
    font-family: var(--font-handwriting);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
    outline: none;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="24" viewBox="0 0 16 24"><path d="M2 22 L8 2 L14 4 L10 22 Z" fill="%23CB997E" stroke="%238B4513" stroke-width="1"/><circle cx="8" cy="3" r="2" fill="%238B4513"/><path d="M8 2 L8 6" stroke="%23F5DEB3" stroke-width="1"/></svg>') 8 12, text;
    caret-color: var(--accent-color);
    padding-top: 0.5rem;
    /* Dinamik defter çizgileri - JavaScript ile güncellenecek */
    --line-height: 1.8rem;
    --font-size: 1.2rem;
    --line-thickness: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        var(--tertiary-skin) calc(var(--line-height) - var(--line-thickness)),
        var(--tertiary-skin) var(--line-height)
    );
    background-size: 100% var(--line-height);
    transition: all 0.3s ease; /* Yumuşak geçiş */
}

/* Fare imleci gizleme - sadece yazarken */
.note-editor.hide-cursor {
    cursor: none !important;
    caret-color: var(--accent-color); /* Metin imlecini görünür tut */
    /* Dinamik çizgilerle uyumlu background */
    background: 
        linear-gradient(
            to bottom,
            transparent 0%,
            transparent calc(var(--line-height) - var(--line-thickness)),
            var(--tertiary-skin) calc(var(--line-height) - var(--line-thickness)),
            var(--tertiary-skin) var(--line-height)
        ),
        linear-gradient(
            90deg,
            rgba(203, 153, 126, 0.08) 0%,
            rgba(203, 153, 126, 0.03) 50%,
            transparent 100%
        );
    background-size: 100% var(--line-height), 100% 100%;
    box-shadow: inset 2px 0 0 rgba(139, 69, 19, 0.3); /* Yazma vurgusu */
}

.note-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-light);
    opacity: 0.7;
    font-style: italic;
}

/* Editor Footer */
.editor-footer {
    padding: 1rem 1.5rem;
    background: var(--primary-skin);
    border-top: 2px solid var(--secondary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 222, 179, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.welcome-content {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 25px;
    box-shadow: 0 10px 30px var(--shadow);
    border: 3px solid var(--tertiary-skin);
}

.welcome-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    transform: rotate(-15deg);
}

.welcome-content h2 {
    font-family: var(--font-handwriting);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.welcome-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Modern Developer Credit */
.developer-credit {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 69, 19, 0.2);
    position: relative;
}

.developer-badge {
    position: relative;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    perspective: 1000px;
}

.badge-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 
        0 8px 32px rgba(139, 69, 19, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.developer-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.developer-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.developer-badge:hover .developer-icon::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.developer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.developed-by {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.developer-name {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.15) 0%,
        rgba(203, 153, 126, 0.15) 100%);
    border: 1px solid rgba(139, 69, 19, 0.2);
    border-radius: 12px;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.tech-tag:hover::before {
    left: 100%;
}

.tech-tag:hover {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.25) 0%,
        rgba(203, 153, 126, 0.25) 100%);
    border-color: rgba(139, 69, 19, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
}

.badge-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.developer-badge:hover .badge-glow {
    opacity: 0.6;
}

.developer-badge:hover .badge-content {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(139, 69, 19, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Mobile Responsive for Developer Credit */
@media (max-width: 768px) {
    .developer-credit {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .badge-content {
        padding: 1rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .developer-info {
        align-items: center;
        text-align: center;
    }
    
    .developer-name {
        font-size: 1.2rem;
    }
    
    .tech-stack {
        justify-content: center;
    }
    
    .tech-tag {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--tertiary-skin);
}

.modal-header {
    background: var(--secondary-skin);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem;
}

.setting-group {
    margin-bottom: 2rem;
}

.setting-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.setting-group input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.setting-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }
    
    /* Show mobile elements */
    .floating-action-btn {
        display: flex;
    }
    
    .bottom-navigation {
        display: flex;
    }
    
         /* Adjust main content for bottom navigation */
     .main-content {
         padding-bottom: 60px;
     }
     
     /* iPhone Safe Area Main Content Support */
     @supports (padding: max(0px)) {
         .main-content {
             padding-bottom: max(60px, calc(60px + env(safe-area-inset-bottom)));
             padding-top: max(0px, env(safe-area-inset-top));
         }
     }
    
    /* Adjust editor for mobile navigation */
    .editor-area {
        margin-bottom: 0;
    }
    
    .main-content {
        flex-direction: row; /* Keep row for sidebar overlay */
    }
    
    /* Mobile Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        border-right: 3px solid var(--secondary-skin);
        border-bottom: none;
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Editor takes full width on mobile */
    .editor-area {
        width: 100%;
        margin-left: 0;
    }
    
    /* Header adjustments */
    .header {
        padding: 0.5rem 1rem;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: nowrap;
        min-height: 60px;
        box-sizing: border-box;
    }
    
         .hamburger-menu {
         order: 1;
         flex-shrink: 0;
         padding: 0.4rem;
         font-size: 1.2rem;
         min-width: 36px;
         height: 36px;
         display: flex;
         align-items: center;
         justify-content: center;
         border-radius: 8px;
         background: rgba(255, 255, 255, 0.1);
         border: 1px solid rgba(139, 69, 19, 0.2);
     }
    
    .logo {
        order: 2;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-width: 0;
    }
    
    .logo h1 {
        font-size: 1.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo i {
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
         .header-actions {
         order: 3;
         gap: 0.3rem;
         flex-wrap: nowrap;
         flex-shrink: 0;
         overflow-x: auto;
         max-width: 45%;
         padding: 0.2rem 0;
         display: flex;
         align-items: center;
         -webkit-overflow-scrolling: touch;
         scrollbar-width: none;
         -ms-overflow-style: none;
     }
     
     .header-actions::-webkit-scrollbar {
         display: none;
     }
    
         /* Compact buttons for mobile */
     .header-actions .btn {
         padding: 0.3rem 0.5rem;
         font-size: 0;
         min-width: 32px;
         height: 32px;
         border-radius: 8px;
         display: flex;
         align-items: center;
         justify-content: center;
         flex-shrink: 0;
     }
     
     .header-actions .btn i {
         font-size: 0.9rem;
         margin: 0;
     }
     
     /* Hide all text on mobile, keep only icons */
     .header-actions .btn span:not(.fas):not(.far):not(.fab),
     .header-actions .btn:not(.btn-new) {
         font-size: 0;
     }
     
     .header-actions .btn span:not(.fas):not(.far):not(.fab) {
         display: none;
     }
     
     /* Specific button adjustments */
     .btn-new i {
         font-size: 1rem;
     }
    
    /* Editor adjustments */
    .editor-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .note-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .editor-actions {
        justify-content: space-between;
        width: 100%;
    }
    
    /* Toolbar adjustments */
    .toolbar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .format-group {
        gap: 0.3rem;
        flex-shrink: 0;
    }
    
    .btn-tool {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Editor container */
    .editor-container {
        padding: 1rem;
    }
    
    .note-editor {
        font-size: 1rem;
        line-height: 1.6;
        padding-top: 0.3rem;
    }
    
    /* Footer adjustments */
    .editor-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .word-count {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
         .word-count span {
         flex: 1;
         min-width: 80px;
     }
}

/* iPhone Specific Styles */
@media only screen 
    and (device-width: 375px) 
    and (device-height: 812px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone X, XS, 11 Pro */
    .header {
        background: linear-gradient(135deg, var(--secondary-skin) 0%, var(--primary-skin) 100%);
    }
    
    .bottom-navigation {
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.95);
    }
}

@media only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 2) {
    /* iPhone XR, 11 */
    .floating-action-btn {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
}

@media only screen 
    and (device-width: 414px) 
    and (device-height: 896px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone XS Max, 11 Pro Max */
    .main-content {
        max-width: 100%;
    }
    
    .sidebar {
        width: 320px;
    }
}

@media only screen 
    and (device-width: 390px) 
    and (device-height: 844px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone 12, 12 Pro, 13, 13 Pro, 14 */
    .bottom-navigation {
        border-radius: 20px 20px 0 0;
        margin: 0 10px;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    }
}

@media only screen 
    and (device-width: 428px) 
    and (device-height: 926px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone 12 Pro Max, 13 Pro Max, 14 Plus */
    .editor-container {
        max-width: 95%;
        margin: 0 auto;
    }
}

@media only screen 
    and (device-width: 393px) 
    and (device-height: 852px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone 14 Pro */
    .header {
        border-radius: 0 0 15px 15px;
    }
}

@media only screen 
    and (device-width: 430px) 
    and (device-height: 932px) 
    and (-webkit-device-pixel-ratio: 3) {
    /* iPhone 14 Pro Max, 15 Pro Max */
    .note-editor {
        font-size: 1.1rem;
        line-height: 1.7;
    }
}

/* Landscape Mode iPhone Optimizations */
@media screen and (orientation: landscape) and (max-height: 430px) {
    .header {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .bottom-navigation {
        height: 50px;
    }
    
    .floating-action-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 70px;
    }
    
    @supports (padding: max(0px)) {
        .floating-action-btn {
            bottom: max(70px, calc(70px + env(safe-area-inset-bottom)));
        }
        
        .bottom-navigation {
            height: calc(50px + env(safe-area-inset-bottom));
        }
    }
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .hamburger-menu {
        display: block;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .header {
        padding: 0.6rem 1.2rem;
        min-height: 65px;
    }
    
    .hamburger-menu {
        padding: 0.5rem;
        font-size: 1.3rem;
        min-width: 40px;
        height: 40px;
    }
    
    .header-actions .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 36px;
        height: 36px;
    }
    
    .editor-container {
        padding: 1.5rem;
    }
    
    /* Show mobile elements on tablet too */
    .floating-action-btn {
        display: flex;
        bottom: 80px;
    }
    
    .bottom-navigation {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 60px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-skin);
}

::-webkit-scrollbar-thumb {
    background: var(--tertiary-skin);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.note-item {
    animation: fadeIn 0.5s ease-out;
}

.category {
    animation: slideIn 0.3s ease-out;
}

/* Özel imleç stilleri */
a, .link {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M8 8 L12 12 M8 12 L12 8" stroke="%238B4513" stroke-width="2"/><circle cx="10" cy="10" r="7" fill="none" stroke="%23CB997E" stroke-width="2"/></svg>') 10 10, pointer;
}

.btn-close {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="7" fill="%23FF6B6B" stroke="%238B4513" stroke-width="2"/><path d="M6 6 L12 12 M6 12 L12 6" stroke="%238B4513" stroke-width="2"/></svg>') 9 9, pointer;
}

/* Resize cursor */
input[type="range"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect x="3" y="8" width="14" height="4" rx="2" fill="%23CB997E" stroke="%238B4513" stroke-width="1"/><circle cx="6" cy="10" r="2" fill="%238B4513"/><circle cx="14" cy="10" r="2" fill="%238B4513"/></svg>') 10 10, ew-resize;
}

/* Checkbox cursor */
input[type="checkbox"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="2" y="2" width="12" height="12" rx="3" fill="%23F5DEB3" stroke="%238B4513" stroke-width="2"/><path d="M5 8 L7 10 L11 6" stroke="%238B4513" stroke-width="2" fill="none"/></svg>') 8 8, pointer;
}

/* Grabbable cursor */
.sidebar, .header {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="6" fill="%23DDBEA9" stroke="%238B4513" stroke-width="2"/><circle cx="6" cy="6" r="1" fill="%238B4513"/><circle cx="12" cy="6" r="1" fill="%238B4513"/><circle cx="6" cy="12" r="1" fill="%238B4513"/><circle cx="12" cy="12" r="1" fill="%238B4513"/></svg>') 9 9, auto;
}

/* Voice Interface Styles */
.voice-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-btn {
    background: linear-gradient(135deg, var(--tertiary-skin) 0%, var(--secondary-skin) 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voice-btn:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--dark-skin) 100%);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

.voice-btn.recording {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5722 100%);
    animation: pulse-record 1.5s infinite;
    color: white;
}

.voice-btn.recording i {
    animation: mic-bounce 0.8s infinite alternate;
}

@keyframes pulse-record {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

@keyframes mic-bounce {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-3px); }
}

/* Voice Indicator */
.voice-indicator {
    display: none;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(255, 107, 107, 0.3);
}

.voice-indicator.active {
    display: flex;
    animation: fadeInScale 0.3s ease-out;
}

.voice-animation {
    display: flex;
    gap: 3px;
    align-items: center;
}

.voice-animation span {
    width: 3px;
    height: 12px;
    background: #FF6B6B;
    border-radius: 2px;
    animation: voice-wave 1.2s infinite ease-in-out;
}

.voice-animation span:nth-child(1) {
    animation-delay: 0s;
}

.voice-animation span:nth-child(2) {
    animation-delay: 0.2s;
}

.voice-animation span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes voice-wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.5;
    }
    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Voice Status Messages */
.voice-status {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 25px;
    font-family: var(--font-casual);
    font-size: 0.9rem;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

.voice-status.show {
    opacity: 1;
    transform: translateY(0);
}

.voice-status.error {
    background: #FF6B6B;
}

.voice-status.success {
    background: #4ECDC4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .voice-group {
        gap: 5px;
    }
    
    .voice-indicator {
        padding: 6px 10px;
    }
    
    .voice-status {
        bottom: 60px;
        right: 10px;
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}

/* ================================
   ULTRA MODERN THEME SYSTEM 2024
   ================================ */

/* Cyberpunk Theme */
body.theme-cyberpunk {
    --primary-skin: #0a0a0a;
    --secondary-skin: #1a1a2e;
    --tertiary-skin: #16213e;
    --dark-skin: #0f4c75;
    --accent-color: #00ff88;
    --text-dark: #00ff88;
    --text-light: #64ffda;
    --white: #000814;
    --shadow: rgba(0, 255, 136, 0.3);
    --hover-shadow: rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, #000814 0%, #001d3d 50%, #003566 100%);
}

body.theme-cyberpunk .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        var(--accent-color) calc(var(--line-height) - var(--line-thickness)),
        var(--accent-color) var(--line-height)
    );
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

/* Ocean Blue Theme */
body.theme-ocean {
    --primary-skin: #e0f7fa;
    --secondary-skin: #b2ebf2;
    --tertiary-skin: #80deea;
    --dark-skin: #4dd0e1;
    --accent-color: #0277bd;
    --text-dark: #01579b;
    --text-light: #0288d1;
    --white: #f8fdff;
    --shadow: rgba(2, 119, 189, 0.2);
    --hover-shadow: rgba(2, 119, 189, 0.4);
    background: linear-gradient(135deg, #f8fdff 0%, #e0f7fa 50%, #b2ebf2 100%);
}

body.theme-ocean .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        rgba(2, 119, 189, 0.3) calc(var(--line-height) - var(--line-thickness)),
        rgba(2, 119, 189, 0.3) var(--line-height)
    );
    box-shadow: inset 0 0 20px rgba(2, 119, 189, 0.1);
}

/* Forest Green Theme */
body.theme-forest {
    --primary-skin: #e8f5e8;
    --secondary-skin: #c8e6c9;
    --tertiary-skin: #a5d6a7;
    --dark-skin: #81c784;
    --accent-color: #2e7d32;
    --text-dark: #1b5e20;
    --text-light: #388e3c;
    --white: #f1f8e9;
    --shadow: rgba(46, 125, 50, 0.2);
    --hover-shadow: rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 50%, #c8e6c9 100%);
}

body.theme-forest .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        rgba(46, 125, 50, 0.4) calc(var(--line-height) - var(--line-thickness)),
        rgba(46, 125, 50, 0.4) var(--line-height)
    );
}

/* Sunset Orange Theme */
body.theme-sunset {
    --primary-skin: #fff3e0;
    --secondary-skin: #ffe0b2;
    --tertiary-skin: #ffcc80;
    --dark-skin: #ffb74d;
    --accent-color: #e65100;
    --text-dark: #bf360c;
    --text-light: #ff5722;
    --white: #fff8f0;
    --shadow: rgba(230, 81, 0, 0.2);
    --hover-shadow: rgba(230, 81, 0, 0.4);
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 30%, #ffe0b2 70%, #ffcc80 100%);
}

body.theme-sunset .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        rgba(230, 81, 0, 0.3) calc(var(--line-height) - var(--line-thickness)),
        rgba(230, 81, 0, 0.3) var(--line-height)
    );
    background-image: 
        linear-gradient(45deg, rgba(255, 152, 0, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 152, 0, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 152, 0, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 152, 0, 0.05) 75%);
    background-size: 20px 20px;
}

/* Lavender Dreams Theme */
body.theme-lavender {
    --primary-skin: #f3e5f5;
    --secondary-skin: #e1bee7;
    --tertiary-skin: #ce93d8;
    --dark-skin: #ba68c8;
    --accent-color: #7b1fa2;
    --text-dark: #4a148c;
    --text-light: #8e24aa;
    --white: #fce4ec;
    --shadow: rgba(123, 31, 162, 0.2);
    --hover-shadow: rgba(123, 31, 162, 0.4);
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 50%, #e1bee7 100%);
}

body.theme-lavender .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        rgba(123, 31, 162, 0.2) calc(var(--line-height) - var(--line-thickness)),
        rgba(123, 31, 162, 0.2) var(--line-height)
    );
}

/* Ultra Minimal Theme */
body.theme-minimal {
    --primary-skin: #ffffff;
    --secondary-skin: #f5f5f5;
    --tertiary-skin: #e0e0e0;
    --dark-skin: #bdbdbd;
    --accent-color: #212121;
    --text-dark: #000000;
    --text-light: #616161;
    --white: #fafafa;
    --shadow: rgba(0, 0, 0, 0.1);
    --hover-shadow: rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

body.theme-minimal .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        rgba(0, 0, 0, 0.1) calc(var(--line-height) - var(--line-thickness)),
        rgba(0, 0, 0, 0.1) var(--line-height)
    );
    border-left: 2px solid #e0e0e0;
}

/* Neon Vibes Theme */
body.theme-neon {
    --primary-skin: #0d1117;
    --secondary-skin: #161b22;
    --tertiary-skin: #21262d;
    --dark-skin: #30363d;
    --accent-color: #ff006e;
    --text-dark: #ff006e;
    --text-light: #8b5cf6;
    --white: #0a0a0a;
    --shadow: rgba(255, 0, 110, 0.3);
    --hover-shadow: rgba(255, 0, 110, 0.6);
    background: linear-gradient(135deg, #0a0a0a 0%, #0d1117 50%, #161b22 100%);
}

body.theme-neon .note-editor {
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent calc(var(--line-height) - var(--line-thickness)),
        var(--accent-color) calc(var(--line-height) - var(--line-thickness)),
        var(--accent-color) var(--line-height)
    );
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
    border-left: 2px solid #8b5cf6;
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
}

body.theme-neon .voice-btn.recording {
    background: linear-gradient(135deg, #ff006e 0%, #8b5cf6 100%);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.7);
}

/* Theme-specific Animations */
body.theme-cyberpunk .btn:hover {
    text-shadow: 0 0 5px var(--accent-color);
    box-shadow: 0 0 15px var(--hover-shadow);
}

body.theme-neon .btn:hover {
    text-shadow: 0 0 8px var(--accent-color);
    box-shadow: 0 0 20px var(--hover-shadow);
}

body.theme-ocean .note-item:hover {
    box-shadow: 0 8px 25px rgba(2, 119, 189, 0.2);
}

body.theme-forest .category:hover {
    background: linear-gradient(45deg, var(--tertiary-skin), var(--secondary-skin));
}

body.theme-sunset .toolbar {
    background: linear-gradient(90deg, var(--secondary-skin), var(--tertiary-skin));
}

body.theme-lavender .header {
    background: linear-gradient(45deg, var(--secondary-skin), var(--tertiary-skin));
}

/* Theme Selector Styling */
.theme-selector {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--secondary-skin);
    border-radius: 15px;
    font-family: var(--font-casual);
    background: var(--white);
    color: var(--text-dark);
    font-size: 1rem;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect x="2" y="4" width="12" height="8" rx="2" fill="%23DDBEA9" stroke="%238B4513" stroke-width="1.5"/><path d="M6 7 L8 9 L10 7" stroke="%238B4513" stroke-width="1.5" fill="none"/></svg>') 8 8, pointer;
    transition: all 0.3s ease;
}

.theme-selector:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--shadow);
}

/* Theme Change Notification */
.theme-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--white);
    border: 3px solid var(--accent-color);
    border-radius: 25px;
    padding: 2rem 3rem;
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.theme-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.theme-notification-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.theme-emoji {
    font-size: 3rem;
    display: block;
    animation: bounce-in 0.6s ease-out;
}

.theme-name {
    font-family: var(--font-handwriting);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
}

.theme-subtitle {
    font-family: var(--font-casual);
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.8;
}

@keyframes bounce-in {
    0% { transform: scale(0.3) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Theme-specific notification colors */
body.theme-cyberpunk .theme-notification {
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

body.theme-ocean .theme-notification {
    background: rgba(248, 253, 255, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(2, 119, 189, 0.3);
}

body.theme-neon .theme-notification {
    background: rgba(10, 10, 10, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.6);
}

body.theme-sunset .theme-notification {
    background: rgba(255, 248, 240, 0.95);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(230, 81, 0, 0.4);
}

/* ================================
   ULTRA MODERN FEATURES CSS 2024
   ================================ */

/* ================================
   ULTRA MODERN FOCUS MODE 2024
   ================================ */

/* Focus Mode Base */
body.focus-mode {
    background: linear-gradient(135deg, 
        var(--primary-skin) 0%, 
        var(--secondary-skin) 50%, 
        var(--tertiary-skin) 100%
    );
}

/* Hide UI Elements with Smooth Animation */
body.focus-mode .header {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition: all 0.8s ease;
}

body.focus-mode .sidebar {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    transition: all 0.8s ease;
}

body.focus-mode .toolbar {
    opacity: 0;
    transform: translateY(-50px);
    pointer-events: none;
    transition: all 0.6s ease;
}

/* Hover to show toolbar briefly */
body.focus-mode .editor-area:hover .toolbar {
    opacity: 0.8;
    transform: translateY(0);
    transition: all 0.3s ease;
}

body.focus-mode .main-content {
    padding: 2rem;
    height: 100vh;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1;
}

body.focus-mode .editor-area {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: transparent;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5;
}

/* Modern Editor Styling */
body.focus-mode .note-editor {
    padding: 4rem 6rem;
    font-size: 1.6rem;
    line-height: 2;
    max-width: 900px;
    margin: 0 auto;
    min-height: 60vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    /* Ensure editor content is visible */
    display: block !important;
    opacity: 1 !important;
}

/* Focus Mode Enhanced Typography */
body.focus-mode .note-editor {
    font-family: var(--font-handwriting);
    font-weight: 400;
    letter-spacing: 0.5px;
    word-spacing: 1px;
    caret-color: var(--accent-color);
}

/* Hover effects for focus mode */
body.focus-mode .note-editor:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Focus Mode Exit Indicator */
body.focus-mode::after {
    content: 'ESC veya F11 ile çık';
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 15px;
    font-family: var(--font-casual);
    font-size: 0.8rem;
    z-index: 1000;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* Modern Word Count in Focus Mode */
body.focus-mode .editor-footer {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.7;
}

/* Theme-specific Focus Mode Variations */
body.theme-cyberpunk.focus-mode .note-editor {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

body.theme-ocean.focus-mode .note-editor {
    background: rgba(2, 119, 189, 0.05);
    border: 1px solid rgba(2, 119, 189, 0.2);
}

body.theme-neon.focus-mode .note-editor {
    background: rgba(255, 0, 110, 0.05);
    border: 1px solid rgba(255, 0, 110, 0.2);
}

/* Progressive Disclosure for Advanced Users */
body.focus-mode .editor-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px 15px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.focus-mode .editor-area:hover .editor-header {
    opacity: 1;
}

/* Mobile Focus Mode */
@media (max-width: 768px) {
    body.focus-mode .main-content {
        padding: 1rem;
    }
    
    body.focus-mode .note-editor {
        padding: 2rem 1.5rem;
        font-size: 1.2rem;
        line-height: 1.8;
        border-radius: 15px;
        min-height: 70vh;
    }
    
    body.focus-mode::after {
        font-size: 0.7rem;
        padding: 6px 12px;
        bottom: 15px;
    }
}

/* ================================
   DANGER ZONE & CLEAR ALL NOTES
   ================================ */

/* Danger Zone Styling */
.danger-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, 
        rgba(255, 69, 58, 0.1) 0%, 
        rgba(255, 59, 48, 0.05) 100%
    );
    border: 2px solid rgba(255, 69, 58, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.danger-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 69, 58, 0.8) 50%, 
        transparent 100%
    );
    animation: danger-sweep 3s ease-in-out infinite;
}

@keyframes danger-sweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

.danger-zone h4 {
    color: #ff453a;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.danger-zone p {
    color: rgba(255, 69, 58, 0.8);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    font-style: italic;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ff453a 0%, #ff3b30 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: var(--font-casual);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 69, 58, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff3b30 0%, #ff2d22 100%);
    box-shadow: 0 6px 20px rgba(255, 69, 58, 0.4);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 69, 58, 0.3);
}

.btn-danger i {
    margin-right: 8px;
}

/* Modal Actions */
.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.02);
}

.modal-actions .btn {
    min-width: 120px;
}

/* ================================
   MODERN CONFIRMATION DIALOG
   ================================ */

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.confirmation-overlay.show {
    opacity: 1;
}

.confirmation-dialog {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    margin: 1rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.confirmation-overlay.show .confirmation-dialog {
    transform: scale(1) translateY(0);
}

.confirmation-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #ff453a 0%, 
        #ff6b35 50%, 
        #ff453a 100%
    );
    animation: confirm-glow 2s ease-in-out infinite;
}

@keyframes confirm-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.confirmation-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.confirmation-icon {
    font-size: 3rem;
    color: #ff453a;
    margin-bottom: 1rem;
    animation: warning-pulse 1.5s ease-in-out infinite;
}

@keyframes warning-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.confirmation-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
    font-family: var(--font-casual);
}

.confirmation-message {
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.confirmation-details {
    background: rgba(255, 69, 58, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid #ff453a;
}

.confirmation-details strong {
    color: #ff453a;
    display: block;
    margin-bottom: 0.5rem;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.confirmation-actions .btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-casual);
}

.btn-confirm-cancel {
    background: #f1f3f4;
    color: #333;
}

.btn-confirm-cancel:hover {
    background: #e8eaed;
    transform: translateY(-1px);
}

.btn-confirm-delete {
    background: linear-gradient(135deg, #ff453a 0%, #ff3b30 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 69, 58, 0.3);
}

.btn-confirm-delete:hover {
    background: linear-gradient(135deg, #ff3b30 0%, #ff2d22 100%);
    box-shadow: 0 6px 20px rgba(255, 69, 58, 0.4);
    transform: translateY(-2px);
}

/* Success Animation */
.delete-success {
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ================================
   SMART SEARCH SYSTEM 2024
   ================================ */

/* Smart Search Container */
.smart-search-container {
    margin-bottom: 1.5rem;
}

/* Enhanced Search Box */
.search-box {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--primary-skin);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.2);
    transform: translateY(-2px);
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 80px;
    border: none;
    background: transparent;
    font-family: var(--font-casual);
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
}

.search-box input::placeholder {
    color: rgba(139, 69, 19, 0.6);
    font-style: italic;
}

/* Search Actions */
.search-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.btn-search-advanced,
.btn-search-clear {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(139, 69, 19, 0.1);
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-search-advanced:hover,
.btn-search-clear:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.btn-search-clear {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    pointer-events: none;
}

.btn-search-clear.show {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

/* Search Suggestions */
.search-suggestions {
    background: white;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--primary-skin);
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-suggestions.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background: var(--primary-skin);
    transform: translateX(4px);
}

.search-suggestion i {
    color: var(--accent-color);
    font-size: 0.9rem;
    width: 16px;
}

.search-suggestion .suggestion-text {
    font-family: var(--font-casual);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.search-suggestion .suggestion-type {
    font-size: 0.7rem;
    color: rgba(139, 69, 19, 0.6);
    margin-left: auto;
}

/* Search Results Info */
.search-results-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(139, 69, 19, 0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    color: rgba(139, 69, 19, 0.8);
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.search-results-info.show {
    opacity: 1;
}

/* Text Highlighting */
.search-highlight {
    background: linear-gradient(120deg, rgba(255, 255, 0, 0.3) 0%, rgba(255, 193, 7, 0.4) 100%);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 1px 3px rgba(255, 193, 7, 0.3);
}

/* Advanced Search Modal */
.advanced-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.advanced-search-modal.show {
    opacity: 1;
    visibility: visible;
}

.advanced-search-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    margin: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.advanced-search-modal.show .advanced-search-content {
    transform: scale(1) translateY(0);
}

/* Advanced Search Header */
.advanced-search-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-skin) 0%, var(--secondary-skin) 100%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-search-header h3 {
    margin: 0;
    font-family: var(--font-casual);
    color: var(--text-dark);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-search-header h3 i {
    color: var(--accent-color);
}

/* Advanced Search Body */
.advanced-search-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.search-filter-group {
    margin-bottom: 1.5rem;
}

.search-filter-group:last-child {
    margin-bottom: 0;
}

.search-filter-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-family: var(--font-casual);
    font-size: 0.95rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 0;
}

.radio-group input[type="radio"] {
    margin: 0;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--primary-skin);
    border-radius: 8px;
    background: white;
    font-family: var(--font-casual);
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.2);
}

/* Date Range */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--primary-skin);
    border-radius: 8px;
    background: white;
    font-family: var(--font-casual);
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 3px 10px rgba(139, 69, 19, 0.2);
}

.date-range span {
    color: var(--accent-color);
    font-weight: 600;
}

/* Advanced Search Actions */
.advanced-search-actions {
    padding: 1rem 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.advanced-search-actions .btn {
    min-width: 100px;
    padding: 10px 16px;
    font-weight: 600;
}

/* No Results */
.no-search-results {
    text-align: center;
    padding: 2rem;
    color: rgba(139, 69, 19, 0.6);
    font-family: var(--font-casual);
}

.no-search-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(139, 69, 19, 0.3);
}

.no-search-results h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
}

.no-search-results p {
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .advanced-search-content {
        width: 95%;
        margin: 0.5rem;
    }
    
    .advanced-search-header,
    .advanced-search-body,
    .advanced-search-actions {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .advanced-search-actions {
        flex-direction: column;
    }
}

/* Smart Save Indicator */
.smart-save-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.smart-save-indicator #saveIcon {
    font-size: 0.6rem;
    animation: pulse-save 2s infinite;
}

.smart-save-indicator.saving #saveIcon {
    color: #ff9800;
    animation: spin 1s linear infinite;
}

.smart-save-indicator.saved #saveIcon {
    color: #4caf50;
    animation: checkmark 0.5s ease;
}

.smart-save-indicator.error #saveIcon {
    color: #f44336;
    animation: shake 0.5s ease;
}

@keyframes pulse-save {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes checkmark {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Typewriter Mode */
body.typewriter-mode .note-editor {
    padding-top: 50vh;
    padding-bottom: 50vh;
}

body.typewriter-mode .note-editor * {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

body.typewriter-mode .note-editor .current-line,
body.typewriter-mode .note-editor *:focus {
    opacity: 1;
}

/* Analytics Panel */
.analytics-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: var(--white);
    border-left: 3px solid var(--tertiary-skin);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.analytics-panel.show {
    right: 0;
}

.analytics-header {
    padding: 1.5rem;
    background: var(--secondary-skin);
    border-bottom: 2px solid var(--tertiary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analytics-header h3 {
    font-family: var(--font-handwriting);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 0;
}

.analytics-content {
    padding: 2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--primary-skin);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--secondary-skin);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-family: var(--font-handwriting);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-section h4 {
    font-family: var(--font-handwriting);
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-skin);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--tertiary-skin));
    width: 0%;
    transition: width 1s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Quick Actions Modal */
.quick-actions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 3000;
    padding-top: 10vh;
}

.quick-actions-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.quick-actions-content {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--tertiary-skin);
    animation: slideDown 0.4s ease;
}

.quick-search {
    padding: 2rem;
    border-bottom: 2px solid var(--secondary-skin);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--primary-skin);
}

.quick-search i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.quick-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.2rem;
    font-family: var(--font-casual);
    color: var(--text-dark);
    background: transparent;
}

.quick-search input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.quick-actions-list {
    max-height: 400px;
    overflow-y: auto;
}

.quick-action {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--secondary-skin);
}

.quick-action:hover {
    background: var(--primary-skin);
    transform: translateX(5px);
}

.quick-action.danger-action {
    border-left: 3px solid #ff453a;
}

.quick-action.danger-action:hover {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.1) 0%, rgba(255, 59, 48, 0.05) 100%);
    transform: translateX(5px);
    border-left: 3px solid #ff453a;
}

.quick-action.danger-action i {
    color: #ff453a;
}

.quick-action.danger-action kbd {
    background: rgba(255, 69, 58, 0.2);
    color: #ff453a;
    border: 1px solid #ff453a;
}

.quick-action.danger-action:hover kbd {
    background: rgba(255, 69, 58, 0.3);
    color: #ff453a;
}

.quick-action i {
    font-size: 1.2rem;
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.quick-action div {
    flex: 1;
}

.quick-action strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.quick-action small {
    color: var(--text-light);
    font-size: 0.85rem;
}

.quick-action kbd {
    background: var(--secondary-skin);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    color: var(--text-dark);
    border: 1px solid var(--tertiary-skin);
}

/* Focus Mode Button States */
.btn-focus.active {
    background: var(--accent-color);
    color: var(--white);
}

.btn-analytics.active {
    background: var(--accent-color);
    color: var(--white);
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideDown {
    0% { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .analytics-panel {
        width: 100%;
        right: -100%;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-content {
        width: 95%;
        margin: 1rem;
    }
    
    body.focus-mode .note-editor {
        padding: 2rem;
        font-size: 1.2rem;
    }
}

/* Dark theme support (eski sistem) */
body.dark-theme {
    --primary-skin: #3C2E26;
    --secondary-skin: #2C1F18;
    --tertiary-skin: #4A3426;
    --dark-skin: #6B4E3D;
    --white: #1A1A1A;
    --text-dark: #E8D5C4;
    --text-light: #C8B5A0;
}

/* Modern Feature Panels */

/* AI Assistant Panel */
.ai-assistant-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-skin), var(--secondary-skin));
    box-shadow: -5px 0 20px var(--shadow);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.ai-assistant-panel.active {
    right: 0;
}

.ai-header {
    padding: 1.5rem;
    background: var(--tertiary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--dark-skin);
}

.ai-content {
    padding: 1.5rem;
}

.ai-suggestions-list {
    margin-bottom: 2rem;
}

.ai-suggestion-item {
    background: var(--white);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid var(--tertiary-skin);
    transition: all 0.3s ease;
}

.ai-suggestion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

.suggestion-type {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 0.9rem;
}

.ai-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-ai-action {
    background: linear-gradient(135deg, var(--accent-color), var(--dark-skin));
    color: var(--white);
    padding: 1rem;
    border-radius: 15px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-ai-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

/* Markdown Preview Panel */
.markdown-preview-panel {
    position: fixed;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100vh;
    background: var(--white);
    box-shadow: 5px 0 20px var(--shadow);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.markdown-preview-panel.active {
    left: 50%;
}

.markdown-header {
    padding: 1rem;
    background: var(--secondary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--tertiary-skin);
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-preview-mode {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--primary-skin);
    border: 1px solid var(--tertiary-skin);
    transition: all 0.3s ease;
}

.btn-preview-mode.active {
    background: var(--accent-color);
    color: var(--white);
}

.markdown-content {
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 1.5rem;
}

.markdown-preview {
    font-family: var(--font-casual);
    line-height: 1.6;
}

/* Pomodoro Timer Panel */
.pomodoro-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 350px;
    background: linear-gradient(135deg, var(--primary-skin), var(--white));
    border-radius: 25px;
    box-shadow: 0 20px 40px var(--shadow);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.pomodoro-panel.active {
    transform: translate(-50%, -50%) scale(1);
}

.pomodoro-panel.minimized {
    transform: translate(-50%, -50%) scale(0);
}

.pomodoro-header {
    padding: 1.5rem;
    background: var(--tertiary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pomodoro-header-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-minimize {
    padding: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-minimize:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: scale(1.1);
}

.pomodoro-content {
    padding: 2rem;
    text-align: center;
}

.timer-display {
    margin-bottom: 2rem;
}

.timer-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: var(--primary-skin);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btn-timer {
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    background: var(--tertiary-skin);
    border: none;
    transition: all 0.3s ease;
}

.btn-timer:hover {
    background: var(--accent-color);
    color: var(--white);
}

.timer-settings {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.timer-settings label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.timer-settings input {
    width: 50px;
    padding: 0.3rem;
    border-radius: 5px;
    border: 1px solid var(--tertiary-skin);
    text-align: center;
}

/* Mini Floating Pomodoro Timer */
.mini-pomodoro-timer {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 180px;
    height: 140px;
    background: linear-gradient(135deg, var(--primary-skin), var(--white));
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
    z-index: 999;
    padding: 15px;
    transform: translateY(200px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 2px solid var(--tertiary-skin);
    backdrop-filter: blur(10px);
    cursor: move;
}

.mini-pomodoro-timer.active {
    transform: translateY(0);
    opacity: 1;
}

.mini-pomodoro-timer:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.4);
}

.mini-timer-circle {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 10px auto;
}

.mini-timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.mini-timer-bg {
    fill: none;
    stroke: rgba(203, 153, 126, 0.3);
    stroke-width: 4;
}

.mini-timer-progress {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.mini-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.mini-timer-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-mini-control {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(139, 69, 19, 0.1);
    color: var(--accent-color);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-mini-control:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: scale(1.1);
}

.mini-timer-status {
    text-align: center;
}

.status-indicator {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.work {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    animation: workPulse 2s ease-in-out infinite alternate;
}

.status-indicator.break {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
    animation: breakPulse 2s ease-in-out infinite alternate;
}

@keyframes workPulse {
    0% { box-shadow: 0 0 5px rgba(255, 107, 107, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 107, 107, 0.8); }
}

@keyframes breakPulse {
    0% { box-shadow: 0 0 5px rgba(78, 205, 196, 0.5); }
    100% { box-shadow: 0 0 15px rgba(78, 205, 196, 0.8); }
}

/* Draggable functionality */
.mini-pomodoro-timer.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    z-index: 1001;
}

/* Notification Badge */
.mini-pomodoro-timer::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #FF4757;
    border-radius: 50%;
    border: 2px solid var(--white);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.mini-pomodoro-timer.notification::before {
    opacity: 1;
    transform: scale(1);
    animation: notificationPulse 1s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mini-pomodoro-timer {
        bottom: 20px;
        right: 20px;
        width: 160px;
        height: 130px;
        padding: 12px;
    }
    
    .mini-timer-circle {
        width: 50px;
        height: 50px;
    }
    
    .mini-timer-text {
        font-size: 0.8rem;
    }
    
    .btn-mini-control {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
}

/* Enhanced animations for timer state changes */
.mini-pomodoro-timer.work-session {
    border-color: #FF6B6B;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.mini-pomodoro-timer.break-session {
    border-color: #4ECDC4;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

.mini-pomodoro-timer.timer-running .mini-timer-progress {
    stroke: #FF6B6B;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.8));
}

.mini-pomodoro-timer.timer-break .mini-timer-progress {
    stroke: #4ECDC4;
    filter: drop-shadow(0 0 5px rgba(78, 205, 196, 0.8));
}

/* Mind Map Panel */
.mindmap-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mindmap-panel.active {
    transform: translateY(0);
}

.mindmap-header {
    padding: 1rem 2rem;
    background: var(--secondary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--tertiary-skin);
}

.mindmap-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-mindmap-tool {
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    background: var(--tertiary-skin);
    border: none;
    transition: all 0.3s ease;
}

.btn-mindmap-tool:hover {
    background: var(--accent-color);
    color: var(--white);
}

.mindmap-content {
    padding: 1rem;
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
}

#mindMapCanvas {
    border: 2px solid var(--tertiary-skin);
    border-radius: 15px;
    background: var(--primary-skin);
    cursor: crosshair;
}

/* Modal Styles for New Features */
.version-history-modal,
.note-linking-modal,
.code-highlight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.version-history-modal.active,
.note-linking-modal.active,
.code-highlight-modal.active {
    display: flex;
}

.version-history-content,
.note-linking-content,
.code-highlight-content {
    background: var(--white);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.version-history-header,
.note-linking-header,
.code-highlight-header {
    padding: 1.5rem;
    background: var(--secondary-skin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--tertiary-skin);
}

.version-history-body,
.note-linking-body,
.code-highlight-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Version History Specific */
.version-timeline {
    position: relative;
}

.version-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tertiary-skin);
}

.version-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 1.5rem;
}

.version-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-color);
}

.version-item.current::before {
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.version-time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Note Linking Specific */
.search-notes input {
    width: 100%;
    padding: 1rem;
    border-radius: 15px;
    border: 2px solid var(--tertiary-skin);
    margin-bottom: 1rem;
}

.linkable-notes {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.linkable-note {
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--primary-skin);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.linkable-note:hover {
    background: var(--tertiary-skin);
    transform: translateX(5px);
}

/* Code Highlight Specific */
.language-selector {
    margin-bottom: 1rem;
}

.language-selector select {
    padding: 0.5rem;
    border-radius: 10px;
    border: 2px solid var(--tertiary-skin);
    background: var(--primary-skin);
}

.code-preview {
    background: #2d3748;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.code-preview pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
}

.code-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-code-action {
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    transition: all 0.3s ease;
}

.btn-code-action:hover {
    background: var(--dark-skin);
    transform: translateY(-2px);
}

/* Enhanced Editor Footer */
.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary-skin);
    border-top: 2px solid var(--tertiary-skin);
    flex-wrap: wrap;
    gap: 1rem;
}

.ai-suggestions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    border: 2px solid var(--tertiary-skin);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-suggestions:hover {
    background: var(--secondary-skin);
    transform: translateY(-2px);
}

.ai-suggestions i {
    color: #FFD700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced Button Styles for New Features */
.btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: ai-glow 3s ease-in-out infinite alternate;
}

@keyframes ai-glow {
    0% { box-shadow: 0 3px 6px var(--shadow); }
    100% { box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); }
}

.btn-markdown {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
}

.btn-pomodoro {
    background: linear-gradient(135deg, #FA709A 0%, #FEE140 100%);
    color: var(--text-dark);
}

/* Responsive Design for New Features */
@media (max-width: 768px) {
    .ai-assistant-panel {
        width: 100%;
        right: -100%;
    }
    
    .markdown-preview-panel {
        width: 100%;
        left: -100%;
    }
    
    .markdown-preview-panel.active {
        left: 0;
    }
    
    .pomodoro-panel {
        width: 90%;
        margin: 0 5%;
    }
    
    .timer-circle {
        width: 150px;
        height: 150px;
    }
    
    .version-history-content,
    .note-linking-content,
    .code-highlight-content {
        width: 95%;
        margin: 0 2.5%;
    }
}

/* Advanced Animations */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

.ai-assistant-panel.active {
    animation: slideInRight 0.3s ease;
}

.markdown-preview-panel.active {
    animation: slideInLeft 0.3s ease;
}

.pomodoro-panel.active {
    animation: fadeInScale 0.3s ease;
}

/* Pomodoro Notification */
.pomodoro-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, var(--accent-color), var(--dark-skin));
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
    z-index: 10000;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.pomodoro-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pomodoro-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.pomodoro-notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
}

/* Animation for notification appearance */
@keyframes notificationSlide {
    0% {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ================================
   IPHONE SAFE AREA SUPPORT 2024
   ================================ */

/* CSS Custom Properties for Safe Areas */
:root {
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-right: env(safe-area-inset-right);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
    --vh: 1vh;
}

/* iPhone Safe Area Body Adjustments */
@supports (padding: max(0px)) {
    body {
        /* Header handles its own top padding, so we only handle sides */
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        /* Bottom padding handled by bottom navigation */
    }
}

/* ================================
   MOBILE ENHANCEMENTS 2024
   ================================ */

/* Floating Action Button */
.floating-action-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--dark-skin) 100%);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    display: none;
    user-select: none;
}

/* iPhone Safe Area FAB Support */
@supports (padding: max(0px)) {
    .floating-action-btn {
        bottom: max(90px, calc(90px + env(safe-area-inset-bottom)));
        right: max(20px, calc(20px + env(safe-area-inset-right)));
    }
}

.floating-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

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

.floating-action-btn.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fabSlideIn 0.3s ease-out;
}

@keyframes fabSlideIn {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bottom Navigation */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--white);
    border-top: 2px solid var(--secondary-skin);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px var(--shadow);
    user-select: none;
}

/* iPhone Safe Area Bottom Navigation Support */
@supports (padding: max(0px)) {
    .bottom-navigation {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        height: calc(60px + env(safe-area-inset-bottom));
    }
}

.bottom-navigation.show {
    display: flex;
    animation: bottomNavSlideUp 0.3s ease-out;
}

@keyframes bottomNavSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    min-width: 60px;
    color: var(--text-light);
}

.bottom-nav-item:hover {
    background: rgba(139, 69, 19, 0.1);
    transform: translateY(-1px);
}

.bottom-nav-item.active {
    color: var(--accent-color);
    background: rgba(139, 69, 19, 0.15);
}

.bottom-nav-item i {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    font-family: var(--font-casual);
}

/* Pull to Refresh */
.pull-to-refresh {
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-skin);
    color: var(--accent-color);
    transition: transform 0.3s ease;
    z-index: 100;
}

/* iPhone Safe Area Pull to Refresh Support */
@supports (padding: max(0px)) {
    .pull-to-refresh {
        top: calc(-80px - env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
}

.pull-to-refresh.pulling {
    transform: translateY(80px);
}

.pull-to-refresh.refreshing .pull-icon i {
    animation: spin 1s linear infinite;
}

.pull-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.pull-text {
    font-size: 0.8rem;
    font-family: var(--font-casual);
    opacity: 0.8;
}

/* Touch Improvements */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Prevent text selection on touch */
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Virtual Keyboard Handling */
.keyboard-open .editor-container {
    padding-bottom: 60px;
}

.keyboard-open .bottom-navigation {
    transform: translateY(100%);
}

.keyboard-open .floating-action-btn {
    bottom: 20px;
}

/* iPhone Safe Area Virtual Keyboard Support */
@supports (padding: max(0px)) {
    .keyboard-open .floating-action-btn {
        bottom: max(20px, calc(20px + env(safe-area-inset-bottom)));
    }
    
    .keyboard-open .editor-container {
        padding-bottom: max(60px, calc(60px + env(safe-area-inset-bottom)));
    }
}

/* Swipe Gestures Helper */
.swipe-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    z-index: 999;
    background: transparent;
    display: none;
}

.swipe-area.show {
    display: block;
}

/* iOS Specific Enhancements */
.ios-device .header {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(221, 190, 169, 0.95);
}

.ios-device .bottom-navigation {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
}

.ios-device.has-notch .header {
    border-radius: 0 0 15px 15px;
    margin: 0 8px;
    padding-top: max(0.8rem, calc(0.8rem + env(safe-area-inset-top)));
}

/* iPhone X and newer specific adjustments */
@media only screen and (min-height: 812px) {
    .ios-device .header {
        padding-top: max(0.8rem, calc(0.8rem + env(safe-area-inset-top)));
        padding-bottom: 0.8rem;
    }
    
    .ios-device .hamburger-menu {
        margin-top: 0.2rem;
    }
    
    .ios-device .logo {
        margin-top: 0.2rem;
    }
    
    .ios-device .header-actions {
        margin-top: 0.2rem;
    }
}

.ios-device.standalone-mode .header {
    padding-top: 1.5rem;
}

.ios-device.has-safe-area .main-content {
    margin-top: var(--detected-safe-area-top, 0);
}

.ios-keyboard-open .bottom-navigation {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.ios-keyboard-open .floating-action-btn {
    bottom: 10px !important;
    transition: bottom 0.3s ease;
}