:root {
    --bg-dark: #0a0a0c;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6c5ce7;
    --accent-glow: rgba(108, 92, 231, 0.5);

    --card-width: 100%;
    --card-height: 120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    /* Mobile App Layout Reset */
    display: block;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Background Ambient Orbs */
.background-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    opacity: 0.2;
    filter: blur(80px);
    top: -100px;
    left: -100px;
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    top: auto;
    bottom: -50px;
    left: auto;
    right: -100px;
    background: radial-gradient(circle, #00d2d3, transparent 70%);
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 30px);
    }
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.5rem;
    z-index: 1;
    position: relative;
    /* Ensure z-index works without flex parent */
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.main-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(108, 92, 231, 0.3));
    animation: none !important;
    transform: none !important;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.highlight {
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.8rem;
    perspective: 1000px;
}

/* Base Card Style */
/* Base Card Style */
.card {
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 70px;
}

.card:hover {
    transform: translateY(-2px) scale(1.01);
}

.icon {
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.card:hover .icon {
    transform: rotate(5deg) scale(1.05);
}

.info h3 {
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

.info p {
    color: var(--text-secondary);
}

/* Split Button Styles */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.small-card {
    gap: 0.6rem !important;
    padding: 0.6rem !important;
}

.small-card .icon {
    width: 30px !important;
    height: 30px !important;
    font-size: 1rem !important;
}

.small-card .info h3 {
    font-size: 0.8rem !important;
    line-height: 1.1;
}

@media (max-width: 360px) {
    .button-group {
        grid-template-columns: 1fr;
    }
}

/* --- Varied Styles --- */

/* 1. Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.shine {
    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;
}

.glass:hover .shine {
    left: 100%;
}

/* 2. Neon Glow */
.neon {
    border: 1px solid transparent;
}

.neon:hover {
    border-color: #ff0055;
    box-shadow: 0 0 20px #ff005580, inset 0 0 10px #ff005540;
}

.neon .icon {
    color: #ff0055;
}

/* 3. Gradient Border */
.gradient-border {
    position: relative;
    background: #0a0a0c;
    z-index: 1;
}

.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, #6c5ce7, #00d2d3);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.gradient-border:hover .icon {
    background: linear-gradient(45deg, #6c5ce7, #00d2d3);
    color: white;
}

/* 4. 3D Push */
.push-3d {
    background: #1e1e24;
    border-bottom: 6px solid #141418;
    transform: translateY(0);
}

.push-3d:hover {
    transform: translateY(2px);
    border-bottom-width: 4px;
}

.push-3d:active {
    transform: translateY(6px);
    border-bottom-width: 0px;
}

/* 5. Neumorphic (Soft UI) */
.neumorphic {
    background: #0a0a0c;
    box-shadow: 10px 10px 30px #050506, -10px -10px 30px #15151e;
    border: none;
}

.neumorphic:hover {
    box-shadow: inset 10px 10px 30px #050506, inset -10px -10px 30px #15151e;
}

/* 6. Liquid / Just CSS for now, JS can enhance */
.liquid {
    background: linear-gradient(135deg, #2d3436, #000000);
}

.liquid:hover {
    background: linear-gradient(135deg, #0984e3, #000000);
}

/* Media Queries */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 50px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.fab:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 50px rgba(108, 92, 231, 0.4);
}

.fab .icon {
    font-size: 1.4rem;
    background: none;
    width: auto;
    height: auto;
}

.fab-text {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Mobile Responsiveness for FAB */
@media (max-width: 600px) {
    .fab {
        bottom: 1.5rem;
        right: 1.2rem;
        padding: 0.7rem 1.2rem;
        gap: 0.5rem;
    }

    .fab-text {
        font-size: 0.85rem;
    }

    .fab .icon {
        font-size: 1.2rem;
    }
}

/* Ensure container has space for FAB on mobile if content is long */
.container {
    padding-bottom: 6rem;
}

/* Install Button Styling */
.install-button {
    margin: 1.5rem auto 0;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    width: fit-content;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: white;
    font-size: 1rem;
}

.install-button:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.install-button .icon {
    font-size: 1.2rem;
    background: none;
    width: auto;
    height: auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 24px;
    position: relative;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header .icon {
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    background: rgba(108, 92, 231, 0.1);
    width: 60px;
    height: 60px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.pin-input-container {
    margin-bottom: 1.5rem;
}

#pin-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    outline: none;
    transition: border-color 0.3s;
}

#pin-input:focus {
    border-color: var(--accent);
}

.verify-button {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.verify-button:hover {
    background: #5b4cc4;
    transform: translateY(-2px);
}

.divider {
    margin: 1.5rem 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0a0a0c;
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.google-button {
    width: 100%;
    padding: 1rem;
    background: white;
    color: #444;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.google-button img {
    width: 20px;
    height: 20px;
}

.google-button:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}
