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

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

:root {
    /* App Mobile - Valvoline Blue */
    --app-mobile: #1e40af;
    --app-mobile-dark: #1e3a8a;
    --app-mobile-light: #3b82f6;
    --app-mobile-glow: rgba(59, 130, 246, 0.35);

    /* Admin - Amber */
    --admin: #f59e0b;
    --admin-dark: #d97706;
    --admin-light: #fbbf24;
    --admin-glow: rgba(245, 158, 11, 0.35);

    /* Neutral */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-primary);
    background: #0a1628;
    overflow-x: hidden;
    position: relative;
}

body::before {
    display: none;
}

/* Floating Particles */
.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 64px;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.logo-image {
    height: 30px;
    width: 179px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: all 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.logo-image:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 60px;
    justify-content: center;
}

.cards-grid > * {
    width: calc((100% - 24px) / 2);
}

/* System Cards - Glassmorphism */
.system-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 32px 40px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 24px;
    text-decoration: none;
    color: #ffffff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 20px 50px rgba(0, 0, 0, 0.25);
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.system-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        transparent 0%,
        var(--card-color-light) 50%,
        transparent 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 500ms ease;
}

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

.system-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 80px;
    background: var(--card-glow);
    filter: blur(40px);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
}

.system-card:hover::after {
    opacity: 1;
}

.system-card.app-mobile {
    --card-color: var(--app-mobile);
    --card-color-dark: var(--app-mobile-dark);
    --card-color-light: var(--app-mobile-light);
    --card-glow: var(--app-mobile-glow);
    cursor: default;
}

.system-card.admin {
    --card-color: var(--admin);
    --card-color-dark: var(--admin-dark);
    --card-color-light: var(--admin-light);
    --card-glow: var(--admin-glow);
}

.system-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.07);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 30px 70px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.12);
}

.system-card:active {
    transform: translateY(-4px);
    transition-duration: 100ms;
}

/* Card stagger animation */
.system-card:nth-child(1) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.system-card:nth-child(2) { animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Icon */
.card-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    border-radius: 22px;
    margin-bottom: 24px;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: opacity 500ms ease;
    filter: blur(16px);
}

.system-card:hover .card-icon::after {
    opacity: 0.5;
}

.card-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.system-card:hover .card-icon {
    transform: scale(1.12) rotate(6deg);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

/* Card Content */
.card-content {
    text-align: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    transition: all 400ms ease;
    letter-spacing: -0.3px;
}

.system-card:hover .card-title {
    color: var(--card-color-light);
}

.card-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    font-weight: 400;
}

.system-card:hover .card-description {
    color: rgba(255, 255, 255, 0.6);
}

/* Card Arrow */
.card-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-arrow svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.system-card:hover .card-arrow {
    background: var(--card-color);
    border-color: var(--card-color);
    transform: scale(1.1);
    box-shadow: 0 8px 20px var(--card-glow);
}

.system-card:hover .card-arrow svg {
    color: #ffffff;
    transform: translateX(3px);
}

/* Sub-buttons for App Mobile */
.card-sub-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
    position: relative;
    z-index: 3;
}

.card-sub-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    z-index: 3;
}

.card-sub-btn:hover {
    background: var(--card-color);
    border-color: var(--card-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--card-glow);
}

.card-sub-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    animation: ripple-animation 700ms ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    animation: fadeIn 0.8s ease-out 0.7s both;
}

.footer-text {
    font-weight: 400;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.motorhero-logo {
    height: 36px;
    width: auto;
    opacity: 0.35;
    transition: all 400ms ease;
    filter: brightness(0) invert(1);
}

.motorhero-logo:hover {
    opacity: 0.7;
}

.footer-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 400ms ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.footer-link svg {
    flex-shrink: 0;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 700px) {
    .cards-grid {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .cards-grid > * {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        margin-bottom: 40px;
    }

    .logo-image {
        height: 40px;
    }

    .subtitle {
        font-size: 1.0625rem;
    }

    .cards-grid {
        gap: 20px;
        margin-bottom: 40px;
    }

    .system-card {
        padding: 36px 28px 32px;
    }

    .card-icon {
        width: 68px;
        height: 68px;
    }

    .card-icon svg {
        width: 34px;
        height: 34px;
    }

    .card-title {
        font-size: 1.375rem;
    }

    .card-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .logo-image {
        height: 34px;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .system-card {
        padding: 32px 24px 28px;
        border-radius: 20px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }

    .card-icon svg {
        width: 30px;
        height: 30px;
    }

    .card-title {
        font-size: 1.25rem;
    }
}

/* Focus Styles for Accessibility */
.system-card:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px var(--card-color),
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 20px 50px rgba(0, 0, 0, 0.25);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particle {
        display: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .particles {
        display: none;
    }

    .system-card {
        box-shadow: none;
        border: 2px solid var(--border);
        color: #000;
    }
}
