/* style.css - Premium Modern Dark Glassmorphism UI Style */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-main: #060913;
    --bg-gradient: radial-gradient(circle at 50% 50%, #111827 0%, #060913 100%);
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-focus: rgba(79, 70, 229, 0.6);
    
    --primary: #5f5cff;
    --primary-hover: #4e4aff;
    --primary-glow: rgba(95, 92, 255, 0.35);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-link: #818cf8;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-border: rgba(16, 185, 129, 0.2);
    
    --error: #f43f5e;
    --error-bg: rgba(244, 63, 94, 0.1);
    --error-border: rgba(244, 63, 94, 0.2);
    
    --info: #0ea5e9;
    --info-bg: rgba(14, 165, 233, 0.1);
    --info-border: rgba(14, 165, 233, 0.2);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-main);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Subtle background glow elements for premium look */
body::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: #4f46e5;
    filter: blur(150px);
    opacity: 0.15;
    top: 15%;
    left: 20%;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: #0ea5e9;
    filter: blur(180px);
    opacity: 0.12;
    bottom: 15%;
    right: 15%;
    pointer-events: none;
    z-index: 0;
}

/* Container for Login & Register forms */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px var(--primary-glow);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input::placeholder {
    color: rgba(156, 163, 175, 0.5);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input:focus + .input-icon {
    color: var(--primary);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px var(--primary-glow);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    box-shadow: none;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cooldown text */
.cooldown-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
}

/* Alerts & Alerts Boxes */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: #fda4af;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: #6ee7b7;
}

/* Links & Redirection Area */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--text-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* --- Dashboard Style --- */
.dashboard-container {
    width: 100%;
    max-width: 1000px;
    padding: 30px 20px;
    z-index: 10;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-family: var(--font-heading);
    color: white;
}

.dashboard-title-area h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
}

.dashboard-title-area p {
    font-size: 13px;
    color: var(--text-muted);
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(244, 63, 94, 0.1);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.data-table th {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table td {
    padding: 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badge status */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Quick Info Panels */
.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.info-panel-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-panel-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

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

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