/* Aryanispe Code - Super Advanced CSS */
:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --gray-text: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Auth Styles */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}

.auth-header p {
    color: var(--gray-text);
    font-size: 1.1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--dark-text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-size: 1.8rem;
}

.main-nav {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-text);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.profile-pic-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

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

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--dark-text);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray-text);
    font-weight: 500;
}

/* AI Code Writer */
.ai-code-writer {
    display: grid;
    gap: 24px;
}

.ai-controls {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 16px;
    align-items: end;
}

.code-output,
.code-editor {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.code-toolbar,
.editor-toolbar {
    background: var(--light-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#codeOutput {
    padding: 20px;
    background: #1e1e1e;
    color: #d4d4d4;
    min-height: 300px;
    max-height: 500px;
    overflow: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
}

#editableCode {
    width: 100%;
    height: 400px;
    padding: 20px;
    border: none;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    background: #1e1e1e;
    color: #d4d4d4;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--light-bg);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.project-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.project-header h3 {
    font-size: 1.2rem;
    color: var(--dark-text);
}

.project-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* File Manager */
.file-manager-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    min-height: calc(100vh - 80px);
}

.projects-sidebar {
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 24px;
}

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

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-text);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-text);
}

.project-item:hover {
    background: var(--light-bg);
    color: var(--dark-text);
}

.project-item.active {
    background: var(--primary);
    color: var(--white);
}

.project-item.active i {
    color: var(--white);
}

.file-editor {
    background: var(--light-bg);
    padding: 0;
}

.editor-header {
    background: var(--white);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: between;
    align-items: center;
}

.file-tabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.file-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--light-bg);
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.file-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.file-tab .fa-times {
    margin-left: 8px;
    opacity: 0.7;
}

.file-tab .fa-times:hover {
    opacity: 1;
}

.code-editor-container {
    padding: 24px;
}

.editor-pane {
    display: none;
}

.editor-pane.active {
    display: block;
}

.code-editor {
    width: 100%;
    height: 500px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: none;
    background: #1e1e1e;
    color: #d4d4d4;
}

/* Hosting */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.website-card {
    background: var(--light-bg);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.website-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.website-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.website-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.website-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.website-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Admin Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--dark-text);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.admin {
    background: #fef3c7;
    color: #d97706;
}

.badge.user {
    background: #dbeafe;
    color: var(--primary);
}

.badge.active {
    background: #d1fae5;
    color: var(--success);
}

.badge.banned {
    background: #fee2e2;
    color: var(--error);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

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

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}

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

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-text);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
}

.alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}

.alert.warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: var(--warning);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-text);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--border-color);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--dark-text);
}

/* Responsive */
@media (max-width: 1024px) {
    .file-manager-content {
        grid-template-columns: 1fr;
    }
    
    .projects-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }
    
    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .ai-controls {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .user-menu {
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .file-tabs {
        flex-direction: column;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--error);
}

.notification.info {
    background: var(--primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    color: var(--white);
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
}

/* File Actions */
.file-actions {
    display: flex;
    gap: 8px;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Code Editor Improvements */
.code-editor:focus {
    outline: none;
    border-color: var(--primary);
}

/* Link Styles */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Textarea Resize */
textarea {
    resize: vertical;
}

/* Select Styles */
select {
    cursor: pointer;
}

/* Focus Styles */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}