:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --text-color: #2b2d42;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #4cc9f0;
    --secondary-color: #b5179e;
    --accent-color: #f72585;
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
}

.search-container {
    position: relative;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#command-search {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

#command-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.6;
}

.app-layout {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.command-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-category {
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--card-bg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
}

.option-category:hover {
    transform: translateX(5px);
    border-left-color: var(--primary-color);
}

.option-category.active {
    background-color: var(--primary-color);
    color: white;
    border-left-color: var(--accent-color);
}

.command-generator {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.command-form {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    min-height: 300px;
}

.form-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-color);
    opacity: 0.6;
    gap: 1rem;
}

.form-placeholder i {
    font-size: 2rem;
}

.command-option {
    margin-bottom: 1rem;
}

.command-option label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.command-option input,
.command-option select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.command-option input:focus,
.command-option select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.generate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    margin-top: 1rem;
}

.generate-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.command-output {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.command-display {
    padding: 1.5rem;
    background-color: rgba(58, 134, 255, 0.1);
    margin: 1rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.command-explanation {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
}

.placeholder {
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    border: none;
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
}

.copy-btn:hover {
    background-color: var(--secondary-color);
}

.copy-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.clear-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.clear-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

.command-history {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.history-list {
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    padding: 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: var(--bg-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
}

.history-item:hover {
    background-color: rgba(58, 134, 255, 0.1);
}

.empty-message {
    text-align: center;
    padding: 1rem;
    color: var(--text-color);
    opacity: 0.6;
}

footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.credits {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification.show {
    opacity: 1;
}

/* Theme toggle switch */
.theme-toggle {
    position: relative;
}

.theme-switch {
    display: none;
}

.theme-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 50px;
    height: 26px;
    background: var(--text-color);
    border-radius: 50px;
    position: relative;
    padding: 0 5px;
}

.theme-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: var(--bg-color);
    border-radius: 50%;
    transition: transform 0.2s linear;
}

.theme-switch:checked + .theme-label .theme-ball {
    transform: translateX(24px);
}

.theme-label i {
    font-size: 0.8rem;
}

.fa-sun {
    color: #f1c40f;
}

.fa-moon {
    color: #f39c12;
}

/* Responsive design */
@media (max-width: 992px) {
    .app-layout {
        grid-template-columns: 200px 1fr;
    }
    
    .command-history {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    
    .command-history {
        grid-column: span 1;
    }
    
    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .app-container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}