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

:root {
    --primary-bg: #0f172a;
    --accent-blue: #38bdf8;
    --accent-purple: #818cf8;
    --accent-pink: #f472b6;
    --accent-green: #34d399;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.15), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(129, 140, 248, 0.15), transparent 40%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: move 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(56, 189, 248, 0.2);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(129, 140, 248, 0.2);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.1);
    }
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Shared Components */
.spion-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

.spion-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.spion-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    max-width: 300px;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Login Specific Styles */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.form-group-modern {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group-modern label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper-modern input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-wrapper-modern input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.btn-spion {
    width: 100%;
    padding: 14px;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.3);
}

.btn-spion:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(56, 189, 248, 0.4);
    filter: brightness(1.1);
}

.error-message-modern {
    color: var(--accent-pink);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.error-message-modern.visible {
    opacity: 1;
}

/* Dashboard Specific Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.brand-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mini .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.brand-mini .logo-icon svg {
    width: 24px;
    height: 24px;
}

.brand-mini h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.hero-section {
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.test-card {
    padding: 2.5rem 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.test-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.test-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
    width: fit-content;
}

.test-card:hover .btn-start {
    background: white;
    color: var(--primary-bg);
}

/* Gradients */
.grad-organo {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.grad-vilo {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.grad-micro {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.btn-logout-modern {
    background: transparent;
    border: none;
    color: var(--accent-pink);
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s;
}

.btn-logout-modern:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

.btn-back-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
}

.header-actions-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .brand-mini {
        width: 100%;
        justify-content: space-between;
    }

    .brand-mini h2 {
        font-size: 1.25rem;
    }

    .header-actions-modern {
        width: 100%;
        justify-content: space-between;
    }

    .user-profile {
        width: 100%;
        justify-content: space-between;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .test-card {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .spion-title {
        font-size: 2rem;
    }
}

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

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .btn-back-modern span {
        display: none;
    }
}