.notepad-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Menu Bar */
.menu-bar {
    background: #2c3e50;
    display: flex;
    padding: 0 20px;
    border-bottom: 1px solid #34495e;
}

.menu-item {
    position: relative;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-item:hover {
    background: #34495e;
}

.menu-item .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
}

.menu-item:hover .dropdown {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown a i {
    width: 20px;
    margin-right: 8px;
}

.dropdown a:hover {
    background: #f0f0f0;
}

.dropdown hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Formatting Toolbar */
.formatting-toolbar {
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.toolbar-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.toolbar-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: #e0e0e0;
}

.word-count {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    padding: 5px 10px;
    background: #e9ecef;
    border-radius: 20px;
}

/* Editor */
.editor-wrapper {
    background: white;
}

#notepad-editor {
    width: 100%;
    min-height: 500px;
    padding: 20px;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

.modal-content .close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.modal-content .close:hover {
    color: #333;
}

.modal-body label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 600;
}

.modal-body input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.checkbox-group {
    margin: 10px 0;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #2c3e50;
    color: white;
}

.modal-btn.cancel {
    background: #95a5a6;
}

.modal-btn:hover {
    opacity: 0.9;
}

/* Special Characters & Emojis Grid */
.special-chars-grid, .emojis-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.special-char, .emoji-char {
    padding: 12px;
    font-size: 20px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.special-char:hover, .emoji-char:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Calculator */
.calculator-modal {
    max-width: 300px;
}

.calculator {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

#calc-display {
    width: 100%;
    padding: 12px;
    font-size: 20px;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    background: white;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    padding: 12px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-btn:hover {
    background: #e0e0e0;
}

#calc-clear {
    background: #dc3545;
    color: white;
}

#calc-equal {
    background: #28a745;
    color: white;
}

/* Shortcuts Table */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
}

.shortcuts-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.shortcuts-table kbd {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-bar {
        flex-wrap: wrap;
    }
    
    .formatting-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .word-count {
        margin-left: 0;
        text-align: center;
    }
    
    .special-chars-grid, .emojis-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}