/* Modern Futuristic Desktop Design */

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7c3aed;
    --accent-color: #ff6b6b;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-input: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #333;
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-card: linear-gradient(145deg, #1a1a2e, #16213e);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Navigation */
nav {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 1rem;
    z-index: 100;
}

nav button {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

nav button:active {
    transform: translateY(0);
}

nav button.active {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.2);
}

/* Sections */
.section {
    display: none;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in;
}

.section.active {
    display: block;
}

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

.section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Action Groups within Sections */
.section > div {
    background: rgba(22, 33, 62, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    backdrop-filter: blur(5px);
}

.section > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
    opacity: 0.6;
}

.section > div:hover {
    background: rgba(22, 33, 62, 0.5);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

/* Action Group Labels */
.section > div:first-of-type::after {
    content: 'Primary Actions';
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--bg-card);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.section > div:nth-of-type(2)::after {
    content: 'Management';
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--bg-card);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.section > div:nth-of-type(3)::after {
    content: 'Operations';
    position: absolute;
    top: -10px;
    left: 1rem;
    background: var(--bg-card);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Buttons within action groups */
.section > div button {
    flex: 0 0 auto;
    min-width: 120px;
    margin: 0;
}

/* Inputs within action groups */
.section > div input {
    flex: 1 1 200px;
    margin: 0;
    min-width: 150px;
}

/* Single elements (not in groups) */
.section > input:not(.section > div input),
.section > button:not(.section > div button),
.section > textarea {
    margin: 1rem 0;
    position: relative;
}

/* Special styling for single action buttons */
.section > button:not(.section > div button) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid transparent;
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.section > button:not(.section > div button)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.section > button:not(.section > div button):hover::before {
    left: 100%;
}

/* Form Controls */
input, textarea, button:not(nav button) {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem;
    margin: 0.5rem 0;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    transform: translateY(-1px);
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Buttons */
button:not(nav button) {
    background: var(--gradient-primary);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

button:not(nav button):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

button:not(nav button):active {
    transform: translateY(0);
}

/* Output Areas */
pre {
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
    position: relative;
    min-height: 50px;
}

pre::-webkit-scrollbar {
    width: 8px;
}

pre::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* Loading Animation */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Glow effects */
.section:hover {
    box-shadow: var(--shadow-card), 0 0 30px rgba(0, 212, 255, 0.1);
}

/* Success/Error states */
.success {
    border-color: #4ade80 !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1) !important;
}

.error {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #00ffff;
        --secondary-color: #9333ea;
        --border-color: #666;
        --text-secondary: #ccc;
    }
}
