:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --secondary: #10B981;
    --accent: #F59E0B;
    --bg: #FAFAFA;
    --card-bg: #FFFFFF;
    --text: #1F2937;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* Landing Page */
.landing {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero {
    text-align: center;
    padding: 60px 20px;
}

.emoji-hero {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--text);
}

.tagline em {
    color: var(--primary);
    font-style: normal;
    font-weight: bold;
}

.subtitle {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 40px;
}

.cta-container {
    margin-top: 30px;
}

.btn {
    padding: 14px 32px;
    font-size: 1.1em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-upload {
    background: var(--accent);
    color: white;
    width: 100%;
}

.btn-upload:hover {
    background: #D97706;
}

.btn-text {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
}

.small {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 10px;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature {
    text-align: center;
    padding: 30px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature h3 {
    margin-bottom: 10px;
    color: var(--text);
}

.feature p {
    color: var(--text-light);
    font-size: 0.95em;
}

/* Waitlist */
.waitlist {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-top: 40px;
}

.waitlist h2 {
    margin-bottom: 15px;
}

.waitlist p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.waitlist form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.waitlist input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1em;
    font-family: inherit;
}

.waitlist input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

.waitlist-message {
    margin-top: 15px;
    font-weight: 600;
    color: var(--secondary);
}

/* App Interface */
.app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

.app-header {
    background: var(--card-bg);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5em;
}

.app-content {
    padding: 30px 20px;
}

/* Habit Setup */
.habit-setup {
    text-align: center;
    padding: 40px 20px;
}

.habit-setup h2 {
    margin-bottom: 30px;
}

.habit-setup input {
    width: 100%;
    max-width: 400px;
    padding: 16px 20px;
    font-size: 1.1em;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: inherit;
}

.habit-setup input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Main App */
.habit-header {
    text-align: center;
    margin-bottom: 40px;
}

.habit-header h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.streak {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.streak-emoji {
    font-size: 1.8em;
}

.streak #streakCount {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent);
}

.streak-label {
    color: var(--text-light);
}

/* Check-in Section */
.check-in-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.check-in-section h3 {
    margin-bottom: 15px;
}

.check-in-status {
    color: var(--text-light);
    margin-bottom: 20px;
}

.check-in-status.completed {
    color: var(--secondary);
    font-weight: 600;
}

.photo-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photo-preview {
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    box-shadow: var(--shadow);
}

.photo-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery */
.gallery-section {
    margin-bottom: 30px;
}

.gallery-section h3 {
    margin-bottom: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 0.75em;
    text-align: center;
}

.gallery-empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-style: italic;
}

/* Premium Tease */
.premium-tease {
    margin-top: 40px;
}

.premium-card {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
}

.premium-card h4 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.premium-card p {
    margin-bottom: 20px;
    opacity: 0.95;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--text-light);
}

.modal-content h2 {
    margin-bottom: 20px;
}

.premium-features {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.premium-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.premium-features li:last-child {
    border-bottom: none;
}

.pricing-hint {
    font-size: 1.1em;
    margin: 20px 0;
    color: var(--text);
}

.pricing-hint strong {
    color: var(--primary);
}

.early-bird {
    background: var(--accent);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.modal-content form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-content input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
}

.modal-content input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

.premium-message {
    margin-top: 15px;
    font-weight: 600;
    color: var(--secondary);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5em;
    }
    
    .tagline {
        font-size: 1.3em;
    }
    
    .waitlist form {
        flex-direction: column;
    }
    
    .waitlist input[type="email"] {
        width: 100%;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}
