:root {
    --primary-gradient: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --insta-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #262626;
    --secondary-text: #8e8e8e;
    --accent-color: #0095f6;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --card-bg: #1e1e1e;
        --text-color: #fafafa;
        --secondary-text: #a8a8a8;
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Header */
.app-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
}

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

.logo {
    font-weight: 800;
    color: white;
    font-size: 1.1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Story Tabs */
.story-container {
    width: 100%;
    padding: 10px 10px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.05);
    scrollbar-width: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.story-container::-webkit-scrollbar { display: none; }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.story-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 2.5px;
    background: #dbdbdb;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.story-item.active .story-circle { background: var(--insta-gradient); }

.story-circle::after {
    content: '';
    position: absolute;
    width: 51px;
    height: 51px;
    background: var(--card-bg);
    border-radius: 50%;
    z-index: 1;
}

.story-icon { font-size: 24px; position: relative; z-index: 2; }
.story-label { font-size: 10px; color: var(--text-color); font-weight: 500; }

/* Main Content */
.centered-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
}

/* Intro Card */
.glass-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.intro-card {
    padding: 40px 25px;
    text-align: center;
    width: 100%;
    margin-top: 40px;
}

.main-title { font-size: 1.8rem; margin-bottom: 10px; color: white; }
.subtitle { color: white; margin-bottom: 30px; font-size: 1rem; opacity: 0.9; }

/* Compact Insta Post */
.insta-post {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 100%;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: auto;
}

.post-header { padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--insta-gradient); display: flex; justify-content: center; align-items: center; font-size: 13px; }
.user-info { flex: 1; }
.username { font-size: 13px; font-weight: 600; }
.location { font-size: 10px; color: var(--secondary-text); }

.post-media {
    width: 100%;
    height: 32vh; /* Further compacted */
    background: #fdf2f8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.soft-circle {
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    z-index: 1;
    transition: background-color 0.3s ease;
}

#menu-emoji {
    font-size: 110px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.12));
    z-index: 2;
    transform: translateY(-5px);
}

.menu-title-section {
    padding: 15px 12px 5px;
    text-align: center;
}

#menu-name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
}

.post-actions { padding: 5px 12px; display: flex; justify-content: space-between; font-size: 18px; }
.main-actions { display: flex; gap: 12px; }

.post-content { padding: 0 12px 8px 12px; }
.likes-count { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.caption { font-size: 13px; line-height: 1.35; }
.caption-user { font-weight: 600; margin-right: 6px; }
.post-tag { color: #00376b; }
.recommended-label { font-weight: 700; margin: 0 4px; }

.post-description { margin: 4px 0; font-size: 13px; color: var(--text-color); }

.post-lucky-tip { 
    font-size: 11px; 
    color: var(--secondary-text); 
    padding: 10px; 
    background: rgba(161, 140, 209, 0.06); 
    border-radius: 8px; 
    border-left: 3px solid #a18cd1; 
    line-height: 1.4;
    margin-top: 8px;
    text-align: left;
}

@media (prefers-color-scheme: dark) {
    .post-lucky-tip { background: rgba(255,255,255,0.04); border-left-color: #fbc2eb; }
    .soft-circle { background: rgba(0, 0, 0, 0.2); }
}

.post-time { font-size: 9px; color: var(--secondary-text); text-transform: uppercase; margin-top: 4px; }
.post-footer-btn { padding: 8px 12px; border-top: 1px solid rgba(0,0,0,0.05); }

/* Buttons */
.primary-btn { width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; background: white; color: #a18cd1; }
.secondary-btn { width: 100%; padding: 10px; border: 1px solid #dbdbdb; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; color: var(--text-color); }

/* Footer */
footer { padding: 15px; text-align: center; color: white; font-size: 0.75rem; }
.footer-links { margin-bottom: 6px; }
.footer-links a { color: white; text-decoration: none; margin: 0 5px; opacity: 0.8; }

.hidden { display: none !important; }
