:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --dark-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--dark-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(67, 97, 238, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(72, 149, 239, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(63, 55, 201, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Login Card Styles */
.login-wrapper {
    width: 100%;
    max-width: 450px;
    perspective: 1000px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
}

h1 {
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 16px 16px 48px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

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

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

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(67, 97, 238, 0.4);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(67, 97, 238, 0.5);
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Dashboard Styles */
.dashboard-container {
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 0.8s ease-out;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.welcome-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.app-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(67, 97, 238, 0.3);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(67, 97, 238, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.app-icon {
    width: 80px;
    height: 80px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    margin-bottom: 20px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    color: var(--accent-color);
}

.app-card:hover .app-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    z-index: 1;
}

.app-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    z-index: 1;
    line-height: 1.5;
}

/* Animations */
@keyframes floating {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}