:root {
    --bg-color: #0f111a;
    --text-color: #ffffff;
    --glass-bg: rgba(25, 28, 41, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --accent-glow: #6a11cb;
    --accent-glow-secondary: #2575fc;
    --success: #00e676;
    --danger: #ff1744;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for Visual Aesthetics */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-glow);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-glow-secondary);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #a0aabf;
    margin-top: 10px;
    font-size: 1.1rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card {
    text-align: center;
}

.stat-card h3 {
    color: #a0aabf;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.stat-card h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #fff, #a0aabf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card p {
    color: #a0aabf;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.subtitle {
    color: #a0aabf;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.mt-4 {
    margin-top: 40px;
}

/* Key Form */
#add-key-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

input:focus {
    border-color: var(--accent-glow-secondary);
}

.btn-glow {
    padding: 12px 25px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, var(--accent-glow), var(--accent-glow-secondary));
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.btn-glow:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-delete {
    background: rgba(255, 23, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 23, 68, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: #a0aabf;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-inactive {
    background: rgba(255, 23, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 23, 68, 0.3);
}

.key-mask {
    font-family: monospace;
    letter-spacing: 1px;
}
