/* Local Inter Font */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(1, 97, 254, 0.02) 0%,
        rgba(245, 247, 250, 0) 25%,
        rgba(1, 97, 254, 0.03) 50%,
        rgba(245, 247, 250, 0) 75%,
        rgba(1, 97, 254, 0.02) 100%);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(1, 97, 254, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(1, 97, 254, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 150, 255, 0.02) 0%, transparent 60%);
    background-size: 200% 200%;
    animation: breathingGradient 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Floating Auto Parts Background */
.auto-parts-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.part {
    position: absolute;
    opacity: 0.06;
    fill: rgb(1, 97, 254);
}

/* Auto Parts Positioning */
.part-gear1 {
    width: 70px;
    height: 70px;
    top: 8%;
    left: 3%;
    animation: floatRotate1 20s ease-in-out infinite;
}

.part-brake {
    width: 75px;
    height: 75px;
    top: 15%;
    right: 8%;
    animation: floatRotate2 22s ease-in-out infinite;
}

.part-spark {
    width: 55px;
    height: 55px;
    top: 40%;
    left: 8%;
    animation: float1 18s ease-in-out infinite;
}

.part-oil {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 12%;
    animation: float2 16s ease-in-out infinite;
}

.part-battery {
    width: 70px;
    height: 70px;
    top: 25%;
    right: 15%;
    animation: float3 19s ease-in-out infinite;
}

.part-airfilter {
    width: 65px;
    height: 65px;
    bottom: 15%;
    right: 10%;
    animation: floatRotate3 24s ease-in-out infinite;
}

.part-spring {
    width: 50px;
    height: 50px;
    top: 55%;
    left: 5%;
    animation: floatBounce 12s ease-in-out infinite;
}

.part-belt {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 18%;
    animation: floatRotate1 26s ease-in-out infinite;
}

.part-radiator {
    width: 70px;
    height: 70px;
    bottom: 8%;
    left: 25%;
    animation: float1 20s ease-in-out infinite;
}

.part-injector {
    width: 55px;
    height: 55px;
    top: 12%;
    left: 20%;
    animation: float2 17s ease-in-out infinite;
}

.part-alternator {
    width: 75px;
    height: 75px;
    bottom: 25%;
    right: 5%;
    animation: floatRotate2 23s ease-in-out infinite;
}

.part-exhaust {
    width: 85px;
    height: 85px;
    top: 45%;
    right: 3%;
    animation: float3 21s ease-in-out infinite;
}

.part-clutch {
    width: 80px;
    height: 80px;
    bottom: 12%;
    right: 28%;
    animation: floatRotate3 25s ease-in-out infinite;
}

.part-shock {
    width: 50px;
    height: 50px;
    top: 70%;
    left: 18%;
    animation: floatBounce 14s ease-in-out infinite;
}

.part-headlight {
    width: 70px;
    height: 70px;
    top: 35%;
    right: 25%;
    animation: float1 19s ease-in-out infinite;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.logo-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Car Wheel */
.gear {
    position: relative;
    width: 100%;
    height: 100%;
    border: 5px solid #2D3748;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E0 100%);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: rotateWheel 4s linear infinite;
}

/* Wheel Spokes */
.gear-tooth {
    position: absolute;
    width: 3px;
    height: 45%;
    background: rgb(1, 97, 254);
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.gear-tooth:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.gear-tooth:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg); }
.gear-tooth:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg); }
.gear-tooth:nth-child(4) { transform: translate(-50%, -50%) rotate(180deg); }

/* Center Hub */
.wrench {
    position: absolute;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgb(1, 97, 254) 0%, rgb(0, 82, 224) 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(1, 97, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrench::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}

.wrench::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgb(1, 97, 254);
    border-radius: 50%;
    z-index: 1;
}

.gear::before {
    content: '';
    position: absolute;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    border: 2px solid #94A3B8;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gear::after {
    content: '';
    position: absolute;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border: 1px dashed #64748B;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-text {
    font-size: 3.5rem;
    font-weight: 700;
    color: rgb(1, 97, 254);
    letter-spacing: -1px;
}

.welcome-text {
    font-size: 1.5rem;
    color: #4A5568;
    font-weight: 400;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.cta-section {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.cta-button {
    position: relative;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.btn-login {
    background: rgb(1, 97, 254);
    color: white;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(1, 97, 254, 0.4);
    background: rgb(0, 82, 224);
}

.btn-register {
    background: white;
    color: rgb(1, 97, 254);
    border: 2px solid rgb(1, 97, 254);
}

.btn-register:hover {
    background: rgb(1, 97, 254);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(1, 97, 254, 0.3);
}

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

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

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

@keyframes rotateWheel {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Background Color Transition Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 75%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 25%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes breathingGradient {
    0%, 100% {
        background-position: 0% 0%;
        opacity: 1;
    }
    25% {
        background-position: 50% 50%;
        opacity: 0.8;
    }
    50% {
        background-position: 100% 100%;
        opacity: 1;
    }
    75% {
        background-position: 50% 50%;
        opacity: 0.9;
    }
}

/* Floating Auto Parts Animations */
@keyframes floatRotate1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(0, -40px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, -20px) rotate(270deg);
    }
}

@keyframes floatRotate2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-30px, 30px) rotate(120deg);
    }
    66% {
        transform: translate(30px, -30px) rotate(240deg);
    }
}

@keyframes floatRotate3 {
    0%, 100% {
        transform: translate(0, 0) rotate(360deg);
    }
    50% {
        transform: translate(-25px, 25px) rotate(0deg);
    }
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(15px, 20px);
    }
    50% {
        transform: translate(-10px, 35px);
    }
    75% {
        transform: translate(-25px, 15px);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(-20px, -25px);
    }
    66% {
        transform: translate(20px, 30px);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(25px, -30px);
    }
}

@keyframes floatBounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-30px);
    }
    50% {
        transform: translateY(-15px);
    }
    75% {
        transform: translateY(-35px);
    }
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 2.5rem;
    }

    .welcome-text {
        font-size: 1.2rem;
    }

    .cta-section {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }

    /* Hide some floating parts on mobile for better performance */
    .part-spark,
    .part-oil,
    .part-airfilter,
    .part-spring,
    .part-belt,
    .part-radiator,
    .part-injector,
    .part-exhaust,
    .part-shock {
        display: none;
    }

    /* Keep only main parts visible on mobile */
    .part-gear1,
    .part-brake,
    .part-battery,
    .part-alternator,
    .part-clutch,
    .part-headlight {
        opacity: 0.04;
    }
}
