/* Enhanced Features Styles for XploitBase */

/* Keyboard Shortcuts */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.shortcut-item kbd {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.85em;
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 0 var(--border-color);
    margin: 0 2px;
}

.shortcut-item span {
    color: var(--text-secondary);
}

/* Side Panels */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: var(--bg-primary);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-panel.active {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-color);
}

.panel-header h3 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.panel-close:hover {
    color: var(--accent-color);
}

.panel-tabs {
    display: flex;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.panel-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.panel-tab:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.panel-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background-color: var(--bg-primary);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3em;
    color: var(--accent-color);
    opacity: 0.3;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1em;
    margin: 10px 0;
}

.empty-state small {
    font-size: 0.9em;
    opacity: 0.7;
}

/* Favorites List */
.favorites-list,
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-item,
.history-item {
    background-color: var(--bg-secondary);
    border-radius: 6px;
    padding: 12px;
    border: 1px solid var(--border-color);
}

.favorite-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.favorite-tool,
.history-tool {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 0.9em;
}

.favorite-category {
    font-size: 0.8em;
    color: var(--text-secondary);
    padding: 2px 8px;
    background-color: var(--bg-primary);
    border-radius: 12px;
}

.history-time {
    font-size: 0.8em;
    color: var(--text-secondary);
}

.favorite-command,
.history-command {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.favorite-command code,
.history-command code {
    flex: 1;
    background-color: var(--bg-primary);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.85em;
    overflow-x: auto;
    white-space: nowrap;
}

.favorite-actions {
    display: flex;
    gap: 5px;
}

.fav-copy,
.fav-remove,
.history-copy {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.fav-copy:hover,
.history-copy:hover {
    background-color: var(--accent-color);
    color: white;
}

.fav-remove:hover {
    background-color: #c0392b;
    color: white;
}

.history-header .clear-history-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.history-header .clear-history-btn:hover {
    background-color: #c0392b;
    color: white;
    border-color: #c0392b;
}

/* Timer Panel */
.timer-section {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.timer-display {
    font-size: 3em;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.timer-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
    font-weight: 500;
}

.start-btn {
    background-color: #27ae60;
    color: white;
}

.start-btn:hover {
    background-color: #1e8449;
}

.pause-btn {
    background-color: #f39c12;
    color: white;
}

.pause-btn:hover {
    background-color: #d35400;
}

.reset-btn {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.reset-btn:hover {
    background-color: #c0392b;
    color: white;
    border-color: #c0392b;
}

/* Tasks Section */
.tasks-section {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tasks-header h4 {
    margin: 0;
    color: var(--accent-color);
}

.add-task-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.add-task-btn:hover {
    opacity: 0.8;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: var(--bg-primary);
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 0.95em;
}

.task-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.task-delete:hover {
    background-color: #c0392b;
    color: white;
}

/* Challenge Info */
.challenge-info {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
}

.challenge-info h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.info-field {
    margin-bottom: 15px;
}

.info-field label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.info-field input,
.info-field select,
.info-field textarea {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95em;
}

.info-field textarea {
    resize: vertical;
}

.save-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s;
}

.save-btn:hover {
    opacity: 0.8;
}

/* Notes Panel */
.notes-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.notes-btn {
    flex: 1;
    padding: 10px 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.notes-btn:hover {
    opacity: 0.8;
}

.note-card {
    background-color: var(--bg-secondary);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.note-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.note-header h4 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.1em;
}

.note-actions {
    display: flex;
    gap: 5px;
}

.note-edit,
.note-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.note-edit:hover {
    background-color: var(--accent-color);
    color: white;
}

.note-delete:hover {
    background-color: #c0392b;
    color: white;
}

.note-preview {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-date {
    font-size: 0.8em;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Note Editor Modal */
.note-editor {
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.note-editor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.note-title-input {
    flex: 1;
    padding: 10px;
    font-size: 1.2em;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-weight: bold;
}

.save-note-btn {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.save-note-btn:hover {
    opacity: 0.8;
}

.note-content-editor {
    flex: 1;
    width: 100%;
    padding: 15px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.95em;
    resize: none;
    line-height: 1.6;
}

.note-editor-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    z-index: 10000;
    transition: bottom 0.3s ease;
    font-size: 0.95em;
}

.toast.show {
    bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }
    
    .timer-display {
        font-size: 2em;
    }
    
    .note-editor {
        height: 90vh;
    }
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #5568d3);
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.fab-container:hover .fab-menu {
    opacity: 1;
    pointer-events: all;
    bottom: 80px;
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

@media (max-width: 768px) {
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .fab-item {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }
}

/* Cheat Sheet Styles */
.cheat-sheet-section {
    margin-bottom: 30px;
}

.cheat-sheet-section h3 {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.cheat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.cheat-item {
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.cheat-item strong {
    display: block;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.cheat-item code {
    display: block;
    background-color: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    overflow-x: auto;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cheat-grid {
        grid-template-columns: 1fr;
    }
}

/* Light Theme Overrides for Features */
.light-theme .side-panel {
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.light-theme .panel-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.light-theme .shortcut-item {
    background-color: #f8fafc;
}

.light-theme .shortcut-item kbd {
    background-color: #ffffff;
    box-shadow: 0 2px 0 #cbd5e1;
}

.light-theme .panel-tab.active {
    background-color: #f8fafc;
}

.light-theme .favorite-item,
.light-theme .history-item {
    background-color: #f8fafc;
}

.light-theme .favorite-item:hover,
.light-theme .history-item:hover {
    background-color: #e0f2fe;
}

.light-theme .timer-display {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.light-theme .timer-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.light-theme .timer-btn.danger {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.light-theme .task-item {
    background-color: #f8fafc;
}

.light-theme .task-item.completed {
    background-color: #f0fdf4;
}

.light-theme #notesTextarea {
    background-color: #f8fafc;
}

.light-theme .notes-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.light-theme .cheat-item {
    background-color: #f8fafc;
}

.light-theme .cheat-item code {
    background-color: #f1f5f9;
}

.light-theme .fab-main {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.light-theme .fab-main:hover {
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.light-theme .fab-item {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-theme .fab-item:hover {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.light-theme .toast {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
