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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f3ef;
    min-height: 100vh;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #424b55;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    padding: 3px 2px;
    font-family: Poppins,Poppins-fallback,Helvetica,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Noto Color Emoji,Segoe UI Symbol,Android Emoji,EmojiSymbols,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Noto Sans,sans-serif;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: calc(1.17rem * 1.875);
}

h3 {
    font-size: calc(1.17rem * 1.25);
}

p {
    color: #424b55;
    font-size: 16px;
    margin-bottom: 1rem;
    font-family: Inter,Inter-fallback,Helvetica,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Noto Color Emoji,Segoe UI Symbol,Android Emoji,EmojiSymbols,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Noto Sans,sans-serif;
}

.highlight {
    color: hsl(2, 62%, 55%);
    font-weight: 600;
}

a:focus {
    outline: auto;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.app-icon img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.main-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
main {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: calc(env(safe-area-inset-left) + 96px);
    padding-right: calc(env(safe-area-inset-right) + 96px);
    padding-top: 64px;
}


@media (max-width: 546px) {
    main {
        padding-left: calc(env(safe-area-inset-left) + 24px);
        padding-right: calc(env(safe-area-inset-right) + 24px);
        padding-bottom: 180px;
    }
}

/* Hero Section */
.hero {
    background: #f5f3ef;
    color: white;
    text-align: center;
}

.hero .container, .line-emoji-container .container {
    margin-top: 2px;
    margin-bottom: 4px;
    overflow: hidden;
    border-radius: calc(24px - 2px);
    box-shadow: rgba(0, 0, 0, 0.04) 0px 10px 20px -6px;
    background-color: hsl( 38, calc(62% + 90%), 90% );
    padding: 60px 22px;
    display: block;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    width: 100%;
}

.app-name {
    max-width: 100%;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.app-store-badge {
    max-width: 100%;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.app-icon-large {
    max-width: 240px;
    width: 100%;
    height: auto;
}

/* Line */
.line-emoji-container .container{
    background-color: hsl( 149, 31%, 90% );
    padding: 30px 18px;
    cursor: pointer;
    margin-top: 4px;
}

.problem-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.problem-left {
    max-width: 260px;
    width: 100%;
}

.problem-right {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .problem-content {
        flex-direction: column;
        text-align: center;
    }
}

.line-emoji {
    max-width: 100%;
    width: 100%;
    height: auto;
}

.problem-text {
    max-width: 100%;
    width: 100%;
    height: auto;
}

/* Problem Statement */
.problem-statement {
    padding: 2rem 0;
}

.questions {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.question {
    font: normal 1.21em KaTeX_Main,Times New Roman,serif;
    margin-bottom: 1rem;
    padding: 1rem;
}

.border {
    width: 100%;
    margin: 8px 0;
    border-bottom: 1px solid #e5ded1;
}

/* Solution */
.solution {
    padding-top: 4rem 0;
}

.solution-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}

.solution-left, .solution-right {
    flex: 1
}

.bear-image {
    max-width: 192px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.solution-title {
    margin-bottom: 1.5rem;
}

/* Features */
.features {
    padding: 12px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    display: flex;
    padding: calc(0.6rem + 0.4rem) calc(0.6rem + 0.4rem) calc(0.6rem + 0.4rem) calc(0.6rem + 0.1em);
    border-radius: calc(24px - 2px);
    box-shadow: rgba(0, 0, 0, 0.04) 0px 10px 20px -6px;
    transition: all 0.3s ease;
    border: 1px solid #e5ded1;
}

.feature-icon {
    min-width: 1.5rem;
    width: 1.8rem;
    display: block;
    position: relative;
    top: 2px;
    margin-bottom: 1rem;
}

.feature-icon img {
    object-fit: contain;
    object-position: center;
    width: 1.3rem;
    font-size: 1.3rem;
    line-height: 1.3rem;
}

.feature-card h3 {
    margin-top: .75rem;
    margin-bottom: 3px;
}

/* Feature Details */
.feature-details {
    padding: 6rem 0;
}

.feature-detail {
    margin-bottom: 6rem;
}

.feature-detail:last-child {
    margin-bottom: 0;
}

.feature-detail-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

@media (max-width: 768px) {
    .feature-detail-content {
        flex-direction: column;
        text-align: center;
    }
}

.feature-detail-text {
    flex: 1;
    min-width: 300px;
    width: 100%;
    text-align: start;
}

.feature-detail-text h2 {
    margin-bottom: 1.5rem;
}

.feature-detail-image {
    flex-shrink: 0;
}

.feature-detail-image img {
    max-width: 240px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .feature-detail-image img.feature4 {
        max-width: 100%;
    }
}

/* Download Section */
.download {
    text-align: center;
    padding: 4rem 0;
}

.download-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.download-text {
    max-width: 528px;
    height: auto;
    width: 100%;
}

.download-badge {
    max-width: 240px;
    height: auto;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* Final Image */
.final-image {
    text-align: center;
}

.bear-loveletter {
    max-width: 288px;
    height: auto;
    width: 100%;
    padding-bottom: 2rem;
}

/* Languages */
.languages {
    padding: 12px 0;
}

.languages .container{
    padding: 0;
}
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2rem;
}

.language-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.language-card {
    display: flex;
    padding: calc(0.6rem + 0.4rem) calc(0.6rem + 0.4rem) calc(0.6rem + 0.4rem) calc(0.6rem + 0.1em);
    border-radius: calc(24px - 2px);
    box-shadow: rgba(0, 0, 0, 0.04) 0px 10px 20px -6px;
    transition: all 0.3s ease;
    border: 1px solid #e5ded1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex: 0 0 calc(25% - 1.125rem);
    min-width: 180px;
    max-width: 220px;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 984px) {
    .language-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .language-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }
}

.language-card:hover {
    transform: translateY(-2px);
    box-shadow: rgba(0, 0, 0, 0.08) 0px 15px 25px -8px;
}

.language-card img {
    max-width: 80px;
    height: auto;
    transition: transform 0.3s ease;
}

.language-card:hover img {
    transform: scale(1.05);
}

.lang-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin: 0;
}

.language-note {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

/* Links */
.links {
    background: #fff;
    padding: 4rem 0;
}

.links-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.link-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.link-card img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.link-card span {
    font-weight: 500;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 48px calc(env(safe-area-inset-right) + 96px) 48px calc(env(safe-area-inset-left) + 96px);
    box-shadow: 11px 14px 10px -8px rgba(0, 0, 0, .02);
    color: #ffffff;
    background: #79c5d0
}

.footer p {
    color: #ffffff;
    text-align: center;
    font-size: 1rem;
}

.footer .copyright {
    opacity: .8;
}

.footer .logo {
    height: 48px;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
    justify-self: start;
    margin-bottom: 24px;
    display: flex;
    justify-self: center;
}

.footer-logo {
    height: 100%;
    width: 100%;
}

.footer-link {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.footer-link.icons {
    display: flex;
    align-items: center;
    padding: 4px;
    gap: 16px;
    font-size: 0;
    margin-bottom: 24px;
}

.footer-link a {
    text-decoration: unset;
    fill: white;
}

.footer .border {
    width: 100%;
    margin-bottom: 32px;
    border-bottom: 1px solid #ffffff;
    opacity: .4;
}

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

.feature-card,
.feature-detail,
.language-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
