/* KVM.CX - PHP Version Styles */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --bg-secondary: #1e293b;
        --text: #f1f5f9;
        --text-secondary: #94a3b8;
        --border: #334155;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.desktop-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--border);
    color: var(--text);
}

.nav-icon {
    width: 16px;
    height: 16px;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.title-section {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: var(--success);
    color: white;
    font-size: 0.875rem;
    border-radius: 9999px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Card */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Form */
.activation-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.type-buttons {
    display: flex;
    gap: 0.5rem;
}

.type-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg);
    border: 2px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: var(--primary);
}

.type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.form-select {
    padding: 0.625rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    border-radius: var(--radius);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Command Section */
.command-section {
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.command-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.command-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.command-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--border);
}

.action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-hover);
}

.btn-icon {
    width: 14px;
    height: 14px;
}

.command-preview {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: var(--radius);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.gvlk-key {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius);
}

.key-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.key-value {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--primary);
}

.copy-key-btn {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: var(--border);
    border: none;
    color: var(--text);
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Instructions */
.instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.instructions-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.steps {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

.steps li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.notice {
    padding: 0.75rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    color: #92400e;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.25rem;
}

.modal-body h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ol {
    margin-left: 1.25rem;
    color: var(--text-secondary);
}

.modal-body li {
    margin-bottom: 0.375rem;
}

.modal-body code {
    background: var(--bg-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875rem;
}

.modal-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.text-center {
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
    .desktop-nav {
        display: none;
    }

    .title {
        font-size: 1.5rem;
    }

    .type-buttons {
        flex-direction: column;
    }

    .command-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .command-actions {
        width: 100%;
    }

    .command-actions .action-btn {
        flex: 1;
        justify-content: center;
    }
}
