
/* DragonCode Enhanced Styles */
:root {
    --primary-color: #00FFFF;
    --secondary-color: #01257D;
    --accent-color: #FF6B6B;
    --success-color: #4CAF50;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --border-color: #333;
    --editor-bg: #1e1e1e;
    --sidebar-bg: #252526;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}

.language-options::-webkit-scrollbar {
    width: 6px;
}

.language-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.language-options::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.language-options::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.dragon {
    color: var(--primary-color);
}

.dev {
    color: var(--text-light);
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(45deg, #ff4757, #ff3742);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Language Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.language-modal-content {
    background: var(--bg-darker);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    max-width: 700px;
    width: 90%;
}

.language-header {
    text-align: center;
    margin-bottom: 2rem;
}

.language-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', monospace;
}

.language-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.language-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.language-option:hover,
.language-option.active {
    border-color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
}

.language-option .language-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.language-option h3 {
    margin-bottom: 0.25rem;
}

.language-option p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.language-desc {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.language-actions {
    text-align: center;
}

/* Membership Modal */
.membership-modal,
.redeem-modal,
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.membership-modal-content,
.redeem-modal-content,
.success-modal-content {
    background: var(--bg-darker);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.membership-header,
.redeem-header {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.membership-header i,
.redeem-header i {
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
}

.membership-benefits {
    margin: 1.5rem 0;
    text-align: left;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}

.benefit i {
    color: var(--success-color);
}

.membership-actions,
.redeem-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Success Animation */
.success-modal-content {
    border-color: var(--success-color);
    overflow: hidden;
}

.success-animation {
    position: relative;
    margin-bottom: 2rem;
}

.success-animation i {
    font-size: 4rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
}

.success-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: celebration 2s ease-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes celebration {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Tier Badge Styles */
.tier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.free {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.tier-badge.basic {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.tier-badge.pro {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    border: 1px solid #00ffff;
}

/* Editor Container */
.editor-container {
    display: grid;
    grid-template-columns: 250px 1fr 400px;
    height: 100vh;
    padding-top: 80px;
}

/* Sidebar */
.editor-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
}

.sidebar-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar-actions .btn {
    padding: 0.5rem;
    font-size: 0.8rem;
}

.file-explorer {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
}

.file-item,
.folder-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
}

.file-item:hover,
.folder-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-item.active {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.file-item i,
.folder-item i {
    width: 16px;
    text-align: center;
}

.file-item .file-actions,
.folder-item .folder-actions {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions,
.folder-item:hover .folder-actions {
    opacity: 1;
}

.file-action,
.folder-action {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
    font-size: 0.8rem;
}

.file-action:hover,
.folder-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Editor Main */
.editor-main {
    display: flex;
    flex-direction: column;
    background: var(--editor-bg);
}

.editor-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
}

.editor-tabs {
    display: flex;
    overflow-x: auto;
    flex: 1;
}

.tab-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
}

.tab-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tab-control:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.2);
}

.editor-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.editor-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.editor-tab.active {
    background: var(--editor-bg);
    color: var(--primary-color);
}

.editor-tab .close-tab {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
    opacity: 0.7;
}

.editor-tab .close-tab:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.code-editor-wrapper {
    flex: 1;
    position: relative;
}

.CodeMirror {
    height: 100% !important;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Preview Panel */
.preview-panel {
    background: var(--bg-darker);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-gray);
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
}

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#previewFrame {
    flex: 1;
    border: none;
    background: white;
}

/* Console Output */
.console-output {
    flex: 1;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.console-header h4 {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.console-logs {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9rem;
}

.console-log {
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    border-radius: 4px;
}

.console-log.log {
    color: var(--text-light);
}

.console-log.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.console-log.warn {
    color: #feca57;
    background: rgba(254, 202, 87, 0.1);
}

.console-timestamp {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.console-message {
    margin-left: 0.5rem;
}

/* Fullscreen Modal */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 4000;
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    background: var(--sidebar-bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-fullscreen {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
}

#fullscreenFrame {
    flex: 1;
    border: none;
    background: white;
}

/* Modal Forms */
.add-file-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.add-file-modal-content {
    background: var(--bg-darker);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.add-file-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-file-header h3 {
    color: var(--primary-color);
    font-family: 'Orbitron', monospace;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.1);
}

.add-file-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.file-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.file-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-type-option:hover,
.file-type-option.active {
    border-color: var(--primary-color);
    background: rgba(0, 255, 255, 0.1);
}

.file-type-option i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.add-file-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Image Preview */
.image-preview {
    margin-top: 1rem;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.footer-nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-nav-links a:hover {
    color: var(--primary-color);
}

.dot {
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 200px 1fr 300px;
    }
    
    .language-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .editor-sidebar {
        max-height: 200px;
    }
    
    .preview-panel {
        max-height: 300px;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-type-options {
        grid-template-columns: 1fr;
    }
    
    .membership-actions,
    .redeem-actions {
        flex-direction: column;
    }
    
    .sidebar-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .sidebar-actions .btn {
        padding: 0.25rem;
        font-size: 0.7rem;
    }
}

/* Warning Modal */
.warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.warning-modal-content {
    background: var(--bg-darker);
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.warning-header {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.warning-header i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.warning-body {
    margin-bottom: 2rem;
}

.warning-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.warning-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
