
/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    background: #0f0f23;
    color: #e5e7eb;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    margin: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    background: #1a1a2e;
    border: 1px solid #16213e;
}

/* Main Content */
.main-content {
    background: #16213e;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #0e3460;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Tabs Container */
.tabs-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid #0e3460;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab-btn {
    background: #1a1a2e;
    border: 1px solid #0e3460;
    color: #9ca3af;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    position: relative;
    font-family: inherit;
}

.tab-btn:hover {
    color: #00d9ff;
    background: #0e3460;
    border-color: #00d9ff;
}

.tab-btn.active {
    color: #00d9ff;
    background: #16213e;
    border-color: #00d9ff;
    border-bottom: 2px solid #00d9ff;
}

.tab-content {
    display: none;
    flex-grow: 1;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
    flex-grow: 1;
}

/* Todo List Styles */
.todo-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section-icon {
    background: #00d9ff;
    color: #0f0f23;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.section-icon i {
    font-size: 1.3rem;
}

.section-info h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
}

.todo-stats {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 400;
}

.todo-controls {
    margin-bottom: 2rem;
}

.todo-input-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.todo-input-section input {
    flex-grow: 1;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    border: 1px solid #0e3460;
    background: #1a1a2e;
    color: #e5e7eb;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.todo-input-section input::placeholder {
    color: #6b7280;
}

.todo-input-section input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

.todo-input-section button {
    background: #00d9ff;
    color: #0f0f23;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.todo-input-section button:hover {
    background: #00b8d4;
}

.todo-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
    z-index: 1;
}

.search-container input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border-radius: 6px;
    border: 1px solid #0e3460;
    background: #1a1a2e;
    color: #e5e7eb;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.search-container input::placeholder {
    color: #6b7280;
}

.search-container input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

.filter-container,
.sort-container {
    min-width: 150px;
}

.filter-container select,
.sort-container select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    border: 1px solid #0e3460;
    background: #1a1a2e;
    color: #e5e7eb;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.filter-container select:focus,
.sort-container select:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

.filter-container select option,
.sort-container select option {
    background: #1a1a2e;
    color: #e5e7eb;
    padding: 0.5rem;
}

.todo-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    max-height: 500px;
}

.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-thumb {
    background: #00d9ff;
    border-radius: 3px;
}

.todo-list::-webkit-scrollbar-track {
    background: #0e3460;
    border-radius: 3px;
}

.todo-item {
    background: #1a1a2e;
    border: 1px solid #0e3460;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s ease;
    position: relative;
}

.todo-item:hover {
    border-color: #00d9ff;
}

.todo-item.completed {
    opacity: 0.6;
    background: #0f1419;
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 2px solid #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.todo-checkbox:hover {
    border-color: #00d9ff;
}

.todo-checkbox i {
    color: #0f0f23;
    font-size: 0.7rem;
    display: none;
}

.todo-checkbox.completed {
    background: #00d9ff;
    border-color: #00d9ff;
}

.todo-checkbox.completed i {
    display: block;
}

.todo-text {
    flex-grow: 1;
    color: #e5e7eb;
    font-size: 1rem;
    word-break: break-word;
    font-weight: 400;
}

.todo-text.completed {
    text-decoration: line-through;
    color: #6b7280;
}

.todo-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.todo-item:hover .todo-actions {
    opacity: 1;
}

.todo-action-btn {
    background: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.todo-action-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    background: #0e3460;
    color: #6b7280;
    padding: 2rem;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.empty-state i {
    font-size: 2rem;
}

.empty-state p {
    color: #9ca3af;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Notepad Styles */
.notepad-container {
    display: flex;
    height: 100%;
    gap: 2rem;
}

.notepad-sidebar {
    width: 300px;
    background: #1a1a2e;
    border: 1px solid #0e3460;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.files-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #e5e7eb;
}

.create-file-btn {
    background: #00d9ff;
    color: #0f0f23;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.create-file-btn:hover {
    background: #00b8d4;
}

.files-search {
    margin-bottom: 1.5rem;
}

.files-search .search-container {
    margin: 0;
}

.files-search input {
    font-size: 0.9rem;
    padding: 0.75rem 0.875rem 0.75rem 2.25rem;
    border-radius: 6px;
}

.files-search .search-icon {
    font-size: 0.8rem;
    left: 0.875rem;
}

.files-list {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.files-list::-webkit-scrollbar {
    width: 4px;
}

.files-list::-webkit-scrollbar-thumb {
    background: #00d9ff;
    border-radius: 2px;
}

.files-list::-webkit-scrollbar-track {
    background: #0e3460;
    border-radius: 2px;
}

.file-item {
    background: #0e3460;
    border: 1px solid #16213e;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    position: relative;
}

.file-item:hover,
.file-item.active {
    border-color: #00d9ff;
}

.file-item.active {
    background: #16213e;
}

.file-name {
    color: #e5e7eb;
    font-size: 0.9rem;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-action-btn {
    background: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    padding: 0.375rem;
    border-radius: 3px;
}

.file-action-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.empty-files-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-files-state i {
    font-size: 1.5rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.empty-files-state p {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.empty-files-state small {
    color: #6b7280;
    font-size: 0.8rem;
}

.notepad-editor {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border: 1px solid #0e3460;
    border-radius: 8px;
    padding: 1.5rem;
}

.no-file-selected {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.no-file-selected i {
    font-size: 2.5rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.no-file-selected p {
    color: #9ca3af;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.no-file-selected small {
    color: #6b7280;
    font-size: 0.9rem;
}

.editor-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #0e3460;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    background: #00d9ff;
    color: #0f0f23;
    padding: 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.file-icon i {
    font-size: 1.1rem;
}

.file-details h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
}

.file-details p {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 400;
}

.editor-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    background: #00d9ff;
    color: #0f0f23;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.action-btn:hover {
    background: #00b8d4;
}

.action-btn.save-btn {
    background: #10b981;
}

.action-btn.save-btn:hover {
    background: #059669;
}

.editor-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#noteEditor {
    flex-grow: 1;
    background: #0f0f23;
    border: 1px solid #0e3460;
    border-radius: 6px;
    padding: 1rem;
    color: #e5e7eb;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    line-height: 1.5;
    transition: border-color 0.2s ease;
    min-height: 400px;
}

#noteEditor::placeholder {
    color: #6b7280;
}

#noteEditor:focus {
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

.char-count {
    color: #6b7280;
    font-size: 0.8rem;
    text-align: right;
    margin-top: 0.75rem;
    font-weight: 400;
}

/* Edit Input Styles */
.edit-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #0e3460;
    background: #1a1a2e;
    color: #e5e7eb;
    font-size: 1rem;
    font-weight: 400;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.edit-input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

.file-edit-input {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #0e3460;
    background: #1a1a2e;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 400;
    transition: border-color 0.2s ease;
    width: 100%;
    font-family: inherit;
}

.file-edit-input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 1px #00d9ff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .notepad-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .notepad-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        margin: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .todo-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container,
    .filter-container,
    .sort-container {
        min-width: unset;
        width: 100%;
    }
    
    .todo-input-section {
        flex-direction: column;
    }
    
    .editor-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .editor-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .todo-item {
        padding: 0.875rem;
    }
    
    .file-item {
        padding: 0.625rem 0.875rem;
    }
    
    #noteEditor {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}

/* Focus visible for accessibility */
.tab-btn:focus-visible,
.todo-input-section button:focus-visible,
.action-btn:focus-visible,
.create-file-btn:focus-visible {
    outline: 2px solid #00d9ff;
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #00d9ff;
    outline-offset: 2px;
}
