:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --danger-color: #ef4444;
    --success-color: #10b981;
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 20%);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Utilities */
.glass-header, .glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Header */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.highlight {
    color: var(--accent-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    padding: 1.5rem;
    border-radius: 1rem;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.3);
}

.card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.status-ok {
    color: var(--success-color);
}

/* Tunnels Section */
.tunnels-section {
    border-radius: 1rem;
    padding: 1.5rem;
    min-height: 400px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

.subdomain-cell {
    font-weight: 600;
    color: var(--accent-color);
}

.url-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.url-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

tr {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Client Setup */
.client-setup {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.setup-step {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.setup-step h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.setup-step p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-primary {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.command-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.command-box p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.code-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #4ade80;
    border: 1px solid #333;
}

.code-block code {
    word-break: break-all;
}

