:root {
    --color-desk-bg: #0a0e27;
    --color-pane-bg: #1a1f3a;
    --color-border: #2d3561;
    --color-text: #e0e6ff;
    --color-terminal: #00ff88;
    --color-accent: #00d4ff;
    --color-run: #00ff88;
    --color-run-hover: #00ffaa;
    --app-bg: #f8fafc;
    --app-sidebar-bg: #1e2847;
    --app-sidebar-text: #ffffff;
    --app-primary: #0066ff;
}

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

body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a0033 50%, #0a0e27 100%);
    color: var(--color-text);
    font-family: 'Consolas', 'Courier New', monospace;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== PARTICLES BACKGROUND ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.3;
    box-shadow: 0 0 10px var(--color-accent);
}

/* ===== TOP ACTION BAR ===== */
#top-action-bar {
    background: rgba(26, 31, 58, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.1);
}

.ide-button {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    font-size: 1.4em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-family: 'Font Awesome 6 Free', sans-serif;
    position: relative;
}

.ide-button:hover:not(.disabled) {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.ide-button.disabled {
    color: #555;
    cursor: default;
    opacity: 0.5;
}

.ide-button:hover:not(.disabled):before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    color: var(--color-accent);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.65em;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid var(--color-accent);
}

/* ===== RUN BUTTON HERO ===== */
.run-btn-hero {
    background: linear-gradient(135deg, var(--color-run) 0%, #00cc66 100%);
    color: #000;
    font-size: 2em;
    padding: 12px 20px;
    border: none;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

.run-btn-hero:hover {
    background: linear-gradient(135deg, var(--color-run-hover) 0%, #00ffaa 100%);
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.9), 0 0 80px rgba(0, 255, 136, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.run-btn-hero:active {
    transform: scale(0.95);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 0 50px rgba(0, 255, 136, 0.9), inset 0 0 20px rgba(255, 255, 255, 0.3); }
}

/* ===== DEV DESK CONTAINER ===== */
#dev-desk-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

#work-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1px;
    background-color: var(--color-border);
    flex-grow: 1;
    overflow: hidden;
}

.pane {
    background-color: var(--color-pane-bg);
    padding: 20px;
    overflow-y: auto;
    border: 1px solid rgba(45, 53, 97, 0.5);
}

.pane-header {
    color: var(--color-accent);
    font-weight: bold;
    font-size: 0.85em;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
}

#code-editor {
    font-size: 1em;
    white-space: pre;
    line-height: 1.6;
}

.code-line {
    display: block;
    margin-bottom: 2px;
}

.keyword { color: #569cd6; }
.string { color: #ce9178; }
.comment { color: #6a9955; }
.class-name { color: #4ec9b0; }
.number { color: #b5cea8; }

#terminal-output {
    color: var(--color-terminal);
    font-size: 0.85em;
    white-space: pre-wrap;
    line-height: 1.5;
}

.status-header {
    color: #ffff00;
    font-weight: bold;
}

#bottom-status-bar {
    background: rgba(26, 31, 58, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85em;
    color: var(--color-text);
    z-index: 100;
}

/* ===== MODAL STYLES ===== */
#modern-ui-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

#modern-ui-modal.open {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#modern-ui-content {
    background: var(--app-bg);
    color: #333;
    width: 95%;
    max-width: 1400px;
    height: 95vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-header h2 {
    font-size: 1.4em;
    color: #1a2b4a;
    margin: 0;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #0066ff;
    transform: rotate(90deg);
}

#app-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--app-sidebar-bg) 0%, #152038 100%);
    color: var(--app-sidebar-text);
    padding: 20px 0;
    font-size: 0.9em;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.app-sidebar a {
    display: block;
    color: var(--app-sidebar-text);
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.app-sidebar a:hover {
    background: rgba(0, 102, 255, 0.1);
    border-left-color: var(--app-primary);
    padding-left: 24px;
}

.app-sidebar a.active {
    background: rgba(0, 102, 255, 0.2);
    border-left-color: var(--app-primary);
    font-weight: bold;
    color: var(--app-primary);
}

.logout-link {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    color: #ff9999 !important;
}

.logout-link:hover {
    background: rgba(255, 100, 100, 0.15);
    border-left-color: #ff6b6b;
}

#modal-content-area {
    padding: 30px;
    overflow-y: auto;
    background: var(--app-bg);
}

#modal-content-area h3 {
    color: var(--app-primary);
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--app-primary);
    padding-left: 15px;
}

#modal-content-area h4 {
    color: #1a2b4a;
    font-size: 1.1em;
    margin-top: 15px;
    margin-bottom: 10px;
}

#modal-content-area p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.welcome-hero {
    background: linear-gradient(135deg, #e9f0f6 0%, #f0f7ff 100%);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--app-primary);
}

.welcome-hero h4 {
    color: var(--app-primary);
    font-size: 1.6em;
    margin: 0 0 10px 0;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

.contact-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
    color: #1a2b4a;
    font-size: 0.95em;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 1em;
    transition: all 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1.05em;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.modal-footer {
    padding: 15px 30px;
    border-top: 1px solid #e0e0e0;
    background: #f9fafb;
    font-size: 0.75em;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* ===== SCROLLBAR STYLING ===== */
.pane::-webkit-scrollbar,
#modal-content-area::-webkit-scrollbar,
.app-sidebar::-webkit-scrollbar {
    width: 8px;
}

.pane::-webkit-scrollbar-track,
#modal-content-area::-webkit-scrollbar-track,
.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.pane::-webkit-scrollbar-thumb,
#modal-content-area::-webkit-scrollbar-thumb,
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

.pane::-webkit-scrollbar-thumb:hover,
#modal-content-area::-webkit-scrollbar-thumb:hover,
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    #work-area {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
    }
    
    #app-body {
        grid-template-columns: 1fr;
    }
    
    .app-sidebar {
        display: flex;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .app-sidebar a {
        padding: 8px 15px;
        white-space: nowrap;
    }
}