/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    /* Colors */
    --primary-color: #F06B7E;
    --primary-light: #f48a99;
    --primary-dark: #d64d61;
    --primary-glow: rgba(240, 107, 126, 0.4);

    --bg-base: #0a0f1c;
    --bg-surface: rgba(20, 27, 45, 0.7);
    --bg-card: rgba(30, 41, 59, 0.5);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --success: #34d399;
    --success-glow: rgba(52, 211, 153, 0.2);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);

    /* Effects (Glassmorphism) */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-backdrop: blur(16px);

    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Ambient Glow Background overlay */
    background-image: radial-gradient(circle at 15% 50%, rgba(240, 107, 126, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(52, 211, 153, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-center {
    text-align: center;
}

.mobile-break {
    display: none;
}

/* Glass Panel Base Class */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-backdrop);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

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

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-image: url('../public/android-icon.png');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-btn {
    background: rgba(240, 107, 126, 0.15);
    color: var(--primary-light);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(240, 107, 126, 0.3);
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Animated background shapes */
.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(240, 107, 126, 0.15);
    top: -10%;
    right: -10%;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(14, 165, 233, 0.1);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(168, 85, 247, 0.1);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 10%) scale(1.05);
    }

    100% {
        transform: translate(-5%, -5%) scale(0.95);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(240, 107, 126, 0.1);
    border: 1px solid rgba(240, 107, 126, 0.2);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper .glass-panel {
    position: relative;
    padding: 1rem;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    max-width: 300px;
    width: 100%;
}

.hero-image-wrapper:hover .glass-panel {
    transform: rotateY(-2deg) rotateX(2deg);
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Floating Elements around Mockup */
.floating-card {
    position: absolute;
    background: rgba(20, 27, 45, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    animation: float-card 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: -15%;
}

.card-2 {
    bottom: 20%;
    right: -10%;
    animation-delay: -3s;
}

@keyframes float-card {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon.income {
    background: var(--success-glow);
    color: var(--success);
}

.card-icon.expense {
    background: var(--danger-glow);
    color: var(--danger);
}

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

.card-text {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ==========================================================================
   Screenshots Section
   ========================================================================== */
.screenshots-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.screenshot-wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-normal);
}

.screenshot-wrap:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.screenshot-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 2.5rem 2rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(240, 107, 126, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(240, 107, 126, 0.2), rgba(240, 107, 126, 0.05));
    border: 1px solid rgba(240, 107, 126, 0.1);
    color: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(240, 107, 126, 0.15) 0%, transparent 70%);
    z-index: -1;
}

.cta-container {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    padding: 5rem 2rem;
    border-radius: 32px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #000;
    color: #fff;
    border: 1px solid #333;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.store-btn:hover {
    transform: scale(1.05);
    border-color: #666;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-text .sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.btn-text .main {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info {
    max-width: 300px;
}

.footer-desc {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.link-group ul li {
    margin-bottom: 0.75rem;
}

.link-group ul a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.link-group ul a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .floating-card {
        display: none;
        /* Hide floating cards on smaller screens for cleaner look */
    }

    .hero-image-wrapper .glass-panel {
        transform: none;
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
    }

    .hero {
        padding-top: 8rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }

    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 500px;
        margin: 0 auto;
    }

    .mobile-break {
        display: block;
    }
}