@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0d0d0d;
    color: #ffffff;
    line-height: 1.6;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.server-selector {
    padding: 1rem;
    border-bottom: 1px solid #333;
}

.selected-server {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-server:hover {
    background: #2a2a2a;
    border-color: #444;
}

.selected-server span {
    flex: 1;
}

.chevron-icon {
    opacity: 0.5;
    transition: transform 0.2s;
}

.selected-server:hover .chevron-icon {
    opacity: 1;
}

.server-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #999;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background: #252525;
    color: #fff;
}

.nav-item:hover .nav-icon {
    opacity: 1;
}

.nav-item.active {
    background: #252525;
    color: #fff;
    border-left: 3px solid #5865f2;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.badge-soon {
    background: #5865f2;
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #333;
}

.btn-share {
    width: 100%;
    padding: 0.75rem;
    background: #5865f2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-share:hover {
    background: #4752c4;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-info:hover {
    background: #252525;
}

.user-info:hover .chevron-down {
    opacity: 1;
}

.chevron-down {
    opacity: 0.5;
    transition: all 0.2s;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #5865f2;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #333;
}

.dropdown-username {
    font-weight: 600;
    color: #fff;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #999;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.dropdown-item:hover {
    background: #252525;
    color: #fff;
}

.dropdown-item:hover svg {
    opacity: 1;
}

.dropdown-divider {
    height: 1px;
    background: #333;
    margin: 0.5rem 0;
}

.content-area {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cards */
.welcome-banner, .status-card, .server-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.server-card {
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.server-card:hover {
    transform: translateY(-2px);
    border-color: #5865f2;
}

.server-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #5865f2;
    margin: 0 auto 1rem;
}

.server-card h3 {
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #fff;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #5865f2;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.btn-primary, .btn-save {
    background: #5865f2;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover, .btn-save:hover {
    background: #4752c4;
}

.btn-primary:disabled, .btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Settings Layout */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.settings-panel, .preview-panel {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
}

.settings-panel h2, .preview-panel h3 {
    margin-bottom: 1.5rem;
}

#previewCanvas {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Connection Status */
.connection-status {
    margin-bottom: 2rem;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-card.warning {
    border-color: #faa61a;
}

.status-icon {
    font-size: 2rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-color: #43b581;
}

.toast.error {
    border-color: #f04747;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.empty-state code {
    background: #252525;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #5865f2;
    font-family: 'Courier New', monospace;
}

/* Server Card Enhancements */
.server-card-meta {
    color: #999;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.server-card-badge {
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: #43b58120;
    color: #43b581;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.loading-shimmer {
    background: linear-gradient(90deg, #252525 25%, #2a2a2a 50%, #252525 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Overview Page */
.overview-header {
    margin-bottom: 2rem;
}

.server-info-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.server-large-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.server-meta {
    color: #999;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #5865f2;
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.quick-actions {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1.5rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: #252525;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-card:hover {
    border-color: #5865f2;
    transform: translateY(-2px);
    background: #2a2a2a;
}

.action-icon {
    font-size: 2rem;
}

.action-title {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
}

.action-desc {
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}
