/* ===========================
   CSS Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: oklch(0.59 0.14 241.1);
    --primary-gradient: linear-gradient(135deg, oklch(0.59 0.14 241.1) 0%, oklch(0.65 0.16 241.1) 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --dark-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --accent-color: oklch(0.59 0.14 241.1);
    --accent-hover: oklch(0.65 0.16 241.1);
    --shadow-glow: 0 20px 60px oklch(0.59 0.14 241.1 / 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===========================
   Background Animation
   =========================== */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Grid Pattern - Chess Board Style */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 80px,
            oklch(0.59 0.14 241.1 / 0.03) 80px,
            oklch(0.59 0.14 241.1 / 0.03) 81px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 80px,
            oklch(0.59 0.14 241.1 / 0.03) 80px,
            oklch(0.59 0.14 241.1 / 0.03) 81px
        );
    background-size: 80px 80px;
    opacity: 0.5;
}

.grid-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-conic-gradient(
            from 0deg at 0% 0%,
            transparent 0deg 90deg,
            oklch(0.59 0.14 241.1 / 0.02) 90deg 180deg
        );
    background-size: 160px 160px;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent 0%, 
        oklch(0.59 0.14 241.1 / 0.4) 50%, 
        transparent 100%);
    animation: lineMove 12s infinite ease-in-out;
    filter: blur(0.5px);
}

/* Vertical Lines - 10 lines */
.line-1 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 5%;
    animation-delay: 0s;
}

.line-2 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 15%;
    animation-delay: -1s;
}

.line-3 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 25%;
    animation-delay: -2s;
}

.line-4 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 35%;
    animation-delay: -3s;
}

.line-5 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 45%;
    animation-delay: -4s;
}

.line-6 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 55%;
    animation-delay: -5s;
}

.line-7 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 65%;
    animation-delay: -6s;
}

.line-8 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 75%;
    animation-delay: -7s;
}

.line-9 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 85%;
    animation-delay: -8s;
}

.line-10 {
    width: 1px;
    height: 100vh;
    top: 0;
    left: 95%;
    animation-delay: -9s;
}

/* Horizontal Lines - 10 lines */
.line-11 {
    width: 100vw;
    height: 1px;
    top: 10%;
    left: 0;
    animation-delay: -0.5s;
}

.line-12 {
    width: 100vw;
    height: 1px;
    top: 20%;
    left: 0;
    animation-delay: -1.5s;
}

.line-13 {
    width: 100vw;
    height: 1px;
    top: 30%;
    left: 0;
    animation-delay: -2.5s;
}

.line-14 {
    width: 100vw;
    height: 1px;
    top: 40%;
    left: 0;
    animation-delay: -3.5s;
}

.line-15 {
    width: 100vw;
    height: 1px;
    top: 50%;
    left: 0;
    animation-delay: -4.5s;
}

.line-16 {
    width: 100vw;
    height: 1px;
    top: 60%;
    left: 0;
    animation-delay: -5.5s;
}

.line-17 {
    width: 100vw;
    height: 1px;
    top: 70%;
    left: 0;
    animation-delay: -6.5s;
}

.line-18 {
    width: 100vw;
    height: 1px;
    top: 80%;
    left: 0;
    animation-delay: -7.5s;
}

.line-19 {
    width: 100vw;
    height: 1px;
    top: 90%;
    left: 0;
    animation-delay: -8.5s;
}

.line-20 {
    width: 100vw;
    height: 1px;
    top: 95%;
    left: 0;
    animation-delay: -9.5s;
}

/* Curved Animations */
.curve {
    position: absolute;
    width: 800px;
    height: 800px;
    border: 2px solid oklch(0.59 0.14 241.1 / 0.3);
    border-radius: 50%;
    animation: curveFloat 20s infinite ease-in-out;
    opacity: 0;
}

.curve::before {
    content: '';
    position: absolute;
    inset: -50px;
    border: 1px solid oklch(0.59 0.14 241.1 / 0.2);
    border-radius: 50%;
    animation: curveRotate 15s linear infinite;
}

.curve::after {
    content: '';
    position: absolute;
    inset: 50px;
    border: 1px solid oklch(0.59 0.14 241.1 / 0.25);
    border-radius: 50%;
    animation: curveRotate 18s linear infinite reverse;
}

.curve-1 {
    top: -400px;
    left: -400px;
    animation-delay: 0s;
}

.curve-2 {
    top: 20%;
    right: -400px;
    animation-delay: -5s;
}

.curve-3 {
    bottom: -400px;
    left: 30%;
    animation-delay: -10s;
}

.curve-4 {
    bottom: 10%;
    right: -200px;
    width: 600px;
    height: 600px;
    animation-delay: -15s;
}

@keyframes curveFloat {
    0% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0;
    }
    25% {
        opacity: 0.4;
    }
    50% {
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.6;
    }
    75% {
        opacity: 0.3;
    }
    100% {
        transform: translate(200px, -200px) scale(0.8);
        opacity: 0;
    }
}

@keyframes curveRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes lineMove {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
}

/* ===========================
   Main Content
   =========================== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ===========================
   Logo Section
   =========================== */
.logo-section {
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.logo {
    width: 100px;
    height: 100px;
    animation: pulse 3s infinite ease-in-out;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px oklch(0.59 0.14 241.1 / 0.5));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===========================
   Welcome Section
   =========================== */
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.welcome-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.brand-name {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.brand-name::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    transform: scaleX(0);
    animation: expandWidth 1s ease-out 1s forwards;
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

.welcome-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.login-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: var(--primary-gradient);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

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

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

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 70px oklch(0.59 0.14 241.1 / 0.4);
}

.login-button:active {
    transform: translateY(-1px);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-icon {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.login-button:hover .button-icon {
    transform: translateX(5px);
}

/* ===========================
   Features Section
   =========================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: oklch(0.59 0.14 241.1 / 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
    transform: rotate(5deg) scale(1.1);
}

.feature-icon svg {
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===========================
   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);
    }
}

/* ===========================
   Responsive Design
   =========================== */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .content {
        padding: 2rem 1.5rem;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    .welcome-title {
        font-size: clamp(1.75rem, 4vw, 3rem);
    }

    .login-button {
        padding: 1.125rem 2.25rem;
        font-size: 1rem;
    }

    .curve-1, .curve-2, .curve-3, .curve-4 {
        width: 600px !important;
        height: 600px !important;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .content {
        padding: 1.5rem 1rem;
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .logo {
        width: 75px;
        height: 75px;
    }

    .logo-section {
        margin-bottom: 1.5rem;
    }

    .welcome-section {
        margin-bottom: 2rem;
    }

    .welcome-title {
        font-size: clamp(1.5rem, 3.5vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .welcome-subtitle {
        font-size: clamp(0.95rem, 2vw, 1.1rem);
        padding: 0 1rem;
    }

    .cta-section {
        margin-bottom: 2.5rem;
        width: 100%;
    }

    .login-button {
        padding: 1rem 1.75rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 400px;
        justify-content: center;
        gap: 0.75rem;
    }

    .button-icon {
        width: 20px;
        height: 20px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        max-width: 100%;
        margin: 0 auto;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Hide some lines on tablets for cleaner look */
    .line-1, .line-3, .line-5, .line-7, .line-9 {
        opacity: 0.15;
    }

    /* Reduce curve sizes on tablets */
    .curve {
        width: 500px !important;
        height: 500px !important;
    }

    .grid-pattern {
        background-size: 60px 60px;
    }
    
    .grid-pattern::before {
        background-size: 120px 120px;
    }
}

/* Small Tablets and Large Phones */
@media (max-width: 640px) {
    .content {
        padding: 1rem 0.75rem;
        min-height: auto;
    }

    .logo {
        width: 65px;
        height: 65px;
    }

    .logo-section {
        margin-bottom: 1.25rem;
    }

    .welcome-title {
        font-size: clamp(1.35rem, 3vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .welcome-subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1rem);
        padding: 0 0.5rem;
    }

    .login-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .button-text {
        font-size: 0.9rem;
    }

    .button-icon {
        width: 18px;
        height: 18px;
    }

    .features {
        gap: 1rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }

    .feature-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        font-size: 0.85rem;
    }

    .footer {
        padding: 1rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Hide most lines on small devices */
    .line-1, .line-2, .line-3, .line-4, .line-5, 
    .line-6, .line-7, .line-8, .line-9 {
        opacity: 0.1;
    }

    .line-11, .line-12, .line-13, .line-14, .line-15,
    .line-16, .line-17, .line-18, .line-19, .line-20 {
        opacity: 0.1;
    }

    /* Minimize curves on small phones */
    .curve {
        width: 300px !important;
        height: 300px !important;
    }

    .curve::before {
        inset: -30px;
    }

    .curve::after {
        inset: 30px;
    }

    .grid-pattern {
        background-size: 40px 40px;
        opacity: 0.3;
    }
    
    .grid-pattern::before {
        background-size: 80px 80px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .content {
        padding: 1rem 0.5rem;
        min-height: auto;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .logo-section {
        margin-bottom: 1rem;
    }

    .welcome-title {
        font-size: clamp(1.2rem, 2.5vw, 1.75rem);
        margin-bottom: 0.5rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
        padding: 0 0.25rem;
    }

    .cta-section {
        margin-bottom: 2rem;
        width: 100%;
    }

    .login-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        width: 100%;
        gap: 0.5rem;
    }

    .button-text {
        font-size: 0.8rem;
    }

    .button-icon {
        width: 16px;
        height: 16px;
    }

    .features {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .feature-card {
        padding: 0.875rem;
        border-radius: 12px;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 0.75rem;
    }

    .feature-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }

    .feature-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .footer {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    /* All lines very subtle on small phones */
    .line {
        opacity: 0.08;
    }

    /* Minimal curves on small phones */
    .curve {
        width: 200px !important;
        height: 200px !important;
        border: 1px solid oklch(0.59 0.14 241.1 / 0.15);
    }

    .curve::before {
        inset: -20px;
        border: 1px solid oklch(0.59 0.14 241.1 / 0.1);
    }

    .curve::after {
        inset: 20px;
        border: 1px solid oklch(0.59 0.14 241.1 / 0.12);
    }

    .grid-pattern {
        background-size: 30px 30px;
        opacity: 0.2;
    }
    
    .grid-pattern::before {
        background-size: 60px 60px;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .content {
        padding: 0.75rem 0.25rem;
    }

    .logo {
        width: 55px;
        height: 55px;
    }

    .logo-section {
        margin-bottom: 0.75rem;
    }

    .welcome-title {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .welcome-subtitle {
        font-size: 0.85rem;
    }

    .login-button {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }

    .feature-card {
        padding: 0.75rem;
    }

    .footer {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }

    .curve {
        width: 150px !important;
        height: 150px !important;
    }
}

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

/* Focus styles for keyboard navigation */
.login-button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}
