:root {
    /* Telegram Premium / Purple Palette */
    --bg-primary: #0f111a; /* Very Deep Violet-Grey */
    --bg-secondary: #181a24; /* Lighter Violet-Grey */
    --accent-color: #9b51e0; /* Vibrant Purple */
    --accent-hover: #b072eb;
    --text-primary: #ffffff;
    --text-secondary: #a3a6c2; /* Cool Grey */
    --danger-color: #ff5b5b;
    --success-color: #00e676;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(24, 26, 36, 0.7);
    --glass-border: rgba(155, 81, 224, 0.2); /* Purple tinted border */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    --card-radius: 16px;
    --btn-radius: 12px;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(155, 81, 224, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(93, 50, 255, 0.1) 0%, transparent 30%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* --- Layout & Typography --- */
.container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

/* --- Header --- */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* --- Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.bot-card {
    background: linear-gradient(145deg, rgba(24, 26, 36, 0.9), rgba(15, 17, 26, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.bot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(155, 81, 224, 0.15); /* Purple glow */
    border-color: rgba(155, 81, 224, 0.5);
}

.bot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.bot-card:hover::before {
    opacity: 1;
}

/* --- Typography in Card --- */
.bot-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.bot-id {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace; /* Tech feel */
    margin-bottom: 20px;
    display: block;
    opacity: 0.8;
}

.bot-info {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.bot-info div {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 8px;
}

.bot-info span {
    color: var(--text-secondary);
}

/* --- Status Indicators --- */
.bot-status {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-color);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
    animation: pulse 2s infinite;
}

.bot-status.expired {
    background-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 91, 91, 0.4);
    animation: none;
}

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #7a3cc2);
    color: white;
    box-shadow: 0 4px 12px rgba(155, 81, 224, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), #8e44e0);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(155, 81, 224, 0.5);
}

.btn-danger {
    background: rgba(255, 91, 91, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(255, 91, 91, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 91, 91, 0.2);
    border-color: var(--danger-color);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

/* --- Floating Action Button --- */
.fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #7a3cc2);
    color: white;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 30px rgba(155, 81, 224, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(14, 22, 33, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s forwards;
}

.modal-content {
    background: #242f3d; /* Solid color for readability */
    border: 1px solid var(--glass-border);
    padding: 32px;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--glass-shadow);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input {
    width: 100%;
    padding: 14px;
    border-radius: var(--btn-radius);
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.2);
    color: var(--text-primary);
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(0,0,0,0.3);
    box-shadow: 0 0 0 3px rgba(95, 177, 246, 0.1);
}

/* --- Auth Page --- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #1a1029 0%, #0f111a 100%);
}

.login-container {
    background: rgba(24, 26, 36, 0.7);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(155, 81, 224, 0.2);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Alerts --- */
.alert {
    padding: 16px;
    border-radius: var(--btn-radius);
    margin-bottom: 24px;
    border-left: 4px solid rgba(0,0,0,0.2);
}
