/* ===============
   CSS VARIABLES
   =============== */
:root {
    --bg-color: #0f172a;
    --primary: #4facfe;
    --primary-glow: rgba(79, 172, 254, 0.5);
    --secondary: #00f2fe;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    --success: #10b981;
    --danger: #ef4444;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.08);
}

/* ===============
   GLOBAL RESET
   =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* ===============
   BACKGROUND SHAPES (GLASSMORPHISM)
   =============== */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #4facfe;
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #00f2fe;
    bottom: -5%;
    right: -5%;
    animation-delay: -5s;
}

.shape-3 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: 40%;
    left: 40%;
    opacity: 0.3;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* ===============
   LAYOUT & CONTAINER
   =============== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ===============
   GLASS PANELS
   =============== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

/* ===============
   HEADER
   =============== */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

.logo h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
    font-weight: 300;
}

/* Timer Circle */
.timer-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 1s linear;
}

.time-text {
    position: absolute;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
}

/* ===============
   TYPOGRAPHY & UTILS
   =============== */
h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

h2 i {
    color: var(--primary);
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

/* ===============
   FORMS & INPUTS
   =============== */
.input-group {
    margin-bottom: 1.25rem;
}

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

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

.flex-input {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.flex-input input {
    flex: 1;
}

/* ===============
   BUTTONS
   =============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-small {
    padding: 0 1rem;
    font-size: 0.85rem;
}

/* ===============
   ACCOUNTS GRID
   =============== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.accounts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar customization */
.accounts-grid::-webkit-scrollbar {
    width: 6px;
}
.accounts-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
.accounts-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.account-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.account-card:hover {
    background: var(--card-hover);
    transform: translateX(5px);
    border-color: rgba(255,255,255,0.2);
}

.acc-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.acc-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.acc-otp {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.otp-code {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.large-code {
    font-size: 2.2rem;
    letter-spacing: 4px;
}

.timer-badge {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.timer-badge.danger {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-icon.delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Instant Result Box */
.instant-result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.4s ease forwards;
}

.save-action label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===============
   TOAST NOTIFICATIONS
   =============== */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transform: translateX(120%);
    animation: slideIn 0.3s forwards;
}

.toast.hiding {
    animation: slideOut 0.3s forwards;
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--primary); }

@keyframes slideIn {
    to { transform: translateX(0); }
}

@keyframes slideOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* Animations */
@keyframes pulseGlow {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.otp-updated {
    animation: pulseGlow 1s ease;
}
