/**
 * XO Development - Core Styles v2.0
 * Shared styles for all pages
 */

/* Mobile Menu Styles */
@media (max-width: 768px) {
    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #0A0A0A;
        flex-direction: column;
        padding: 80px 24px 24px;
        transition: right 0.3s ease;
        z-index: 999;
        border-left: 1px solid #222;
        box-shadow: -4px 0 20px rgba(0,0,0,0.5);
    }
    
    header nav.open {
        right: 0;
    }
    
    header nav a {
        display: block;
        padding: 16px 0;
        font-size: 18px;
        border-bottom: 1px solid #222;
        width: 100%;
        text-align: left;
    }
    
    header nav a:last-child {
        border-bottom: none;
        margin-top: 16px;
    }
    
    header nav a.btn {
        text-align: center;
        margin-top: 24px;
    }
    
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 8px;
    }
    
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #D4A84B;
        margin: 3px 0;
        transition: all 0.3s ease;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Overlay when menu open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}

/* Gold accent colors */
:root {
    --gold: #D4A84B;
    --gold-dark: #B8923F;
    --red: #E84545;
    --red-dark: #C93636;
    --bg-dark: #0A0A0A;
    --bg-card: #111;
    --text: #fff;
    --text-muted: #888;
    --border: #222;
}

/* Form improvements */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.2);
}

/* Button states */
.btn {
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary:hover:not(:disabled) {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(212, 168, 75, 0.1);
}

/* Loading states */
.loading {
    position: relative;
    color: transparent !important;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    z-index: 10001;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: #2ecc71;
}

.toast.error {
    border-color: var(--red);
}

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

/* Card hover effects */
.api-card, .feature-card, .price-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.api-card:hover, .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

/* Responsive tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
    }
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--gold);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Revenue chart */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding: 20px 0;
    gap: 8px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--gold), var(--red));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Delete confirmation modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal h3 {
    color: var(--red);
    margin-bottom: 16px;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
