:root {
    --bg-color: #f4f7f6;
    --text-color: #1a1a1a;
    --subtext-color: #555;
    --accent-start: #ff7e5f;
    --accent-end: #feb47b;
    --shadow-color: rgba(255, 126, 95, 0.2);
    --card-bg: #ffffff;
    --nav-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    padding-top: 80px;
    overflow-x: hidden;
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.navbar {
    background-color: var(--nav-bg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease, min-height 0.3s ease;
}
.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
}
.nav-links a {
    color: var(--subtext-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--accent-start);
}

.language-selector {
    margin-left: 1.5rem;
}
#language-switcher {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}

.section {
    margin: 4rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.section-title {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    margin-bottom: 1rem;
}

.header {
    padding: 4rem 0 2rem 0;
    animation: fadeInDown 0.8s ease-out;
}
.main-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.gradient-text {
    background: linear-gradient(45deg, var(--accent-start), var(--accent-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--subtext-color);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

.pixel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 22px;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}
.pixel {
    background-color: var(--card-bg);
    aspect-ratio: 1 / 1;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}
.pixel:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.friend-box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}
.friend-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 3rem;
    transition: transform 0.2s, box-shadow 0.2s;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.friend-box:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.lucky-color-btn {
    background: linear-gradient(45deg, var(--accent-start), var(--accent-end));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 30px var(--shadow-color);
}
.lucky-color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.footer {
    background: #e9ecef;
    color: var(--subtext-color);
    padding: 2rem;
    margin-top: 4rem;
}
.footer-links {
    margin-top: 1rem;
}
.footer-links a {
    color: var(--subtext-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent-start);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 25px 80px -10px rgba(0,0,0,0.25);
    position: relative;
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    width: 90%;
    max-width: 500px;
}
.modal-title {
    color: var(--subtext-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.modal-result-card {
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    transition: background 0.5s ease;
}
.modal-result {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}
#lucky-color-message {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: white;
    margin-top: 1rem;
    opacity: 0.9;
}

.share-title {
     font-weight: bold;
     margin-bottom: 1rem;
}
.share-options {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s, opacity 0.2s;
}
.share-btn:hover { transform: scale(1.15); opacity: 0.9; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.copy { background: #6c757d; cursor: pointer; border: none; }

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.close-modal:hover { color: #333; transform: rotate(90deg); }

/* Static Page Styles */
.static-page {
    text-align: left;
    padding-top: 4rem;
}

.static-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.static-page h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-start);
}

.static-page p, .static-page li {
    color: var(--subtext-color);
    margin-bottom: 1rem;
}
.static-page ul {
    list-style-position: inside;
    padding-left: 1rem;
}
.static-page a {
    color: var(--accent-start);
    text-decoration: none;
}
.static-page a:hover {
    text-decoration: underline;
}


@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@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); } }
@keyframes zoomIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 768px) {
    body { padding-top: 80px; }
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .nav-brand { margin-bottom: 0; }
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
     .language-selector {
        order: 2;
    }
    .nav-links a { margin: 0 0.75rem; }
    .container { padding: 0 1rem; }
    .section { padding: 1.5rem; margin: 2.5rem auto; }
    .main-title { font-size: clamp(2.2rem, 10vw, 3rem); }
    .subtitle { font-size: clamp(0.9rem, 4vw, 1rem); }
    .pixel-grid { gap: 15px; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .friend-box-container { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .modal-content { padding: 1.5rem; width: 95%; }
    .modal-result { font-size: clamp(2.2rem, 8vw, 3rem); }
    .close-modal { top: 10px; right: 15px; }

    .static-page h1 { font-size: 2rem; }
    .static-page h2 { font-size: 1.5rem; }
}