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

:root {
    --primary-color: #ff8c42;
    --primary-hover: #ff7a2e;
    --secondary-color: #ffb366;
    --accent-color: #ff9f66;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    --bg-color: #faf8f5;
    --bg-gradient: linear-gradient(135deg, #faf8f5 0%, #fff5e6 100%);
    --card-bg: #ffffff;
    --card-shadow: 0 8px 24px rgba(255, 140, 66, 0.15);
    --text-primary: #5d4037;
    --text-secondary: #8d6e63;
    --border-color: #ffe0b2;
    --shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
    --shadow-lg: 0 12px 32px rgba(255, 140, 66, 0.25);
    --mood-great: #51cf66;
    --mood-good: #74c0fc;
    --mood-ok: #ffd43b;
    --mood-anxious: #ff8787;
    --mood-low: #b197fc;
    --mood-not: #ff9f66;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 182, 193, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 218, 185, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 120px; /* Space for bottom nav + footer */
    min-height: 100vh;
}

body.show-app {
    padding-bottom: 80px;
}

body.show-landing {
    padding-bottom: 0;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
    padding: 1.25rem 1rem;
    box-shadow: 0 4px 20px rgba(255, 140, 66, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.header-logo {
    height: 55px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.header-logo:hover {
    opacity: 0.8;
}

.header-taglines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-tagline-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.header-tagline-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Birthday Celebration */
.birthday-celebration {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    border: 3px solid var(--primary-color);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.3);
    animation: birthdayBurst 0.6s ease;
}

@keyframes birthdayBurst {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

.birthday-logo {
    height: 120px;
    width: auto;
    animation: bounce 2s ease infinite;
}

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

.birthday-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.birthday-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.pet-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0;
}

/* Desktop header layout */
@media (min-width: 768px) {
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
    }
    
    .header-logo {
        height: 50px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .pet-selector {
        flex: 0 0 auto;
        min-width: 200px;
        max-width: 300px;
    }
    
    .pet-selector select {
        min-width: 150px;
    }
}

.pet-selector select {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pet-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

/* Screens */
.screen {
    display: none;
    min-height: calc(100vh - 70px);
}

.screen.active {
    display: block;
}

.content {
    padding: 1.5rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Date Header */
.date-header {
    margin-bottom: 1.5rem;
}

.date-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.date-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Mood Grid */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.mood-btn {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.2;
    position: relative;
    overflow: hidden;
}

.mood-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.05) 0%, rgba(255, 179, 102, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mood-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.25);
}

.mood-btn:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.05) 0%, rgba(255, 179, 102, 0.05) 100%);
}

.mood-btn.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.3);
    transform: scale(1.05);
}

.mood-btn.selected::before {
    opacity: 1;
}

.mood-btn[data-mood="great"]:hover,
.mood-btn[data-mood="great"].selected {
    border-color: var(--mood-great);
    background: linear-gradient(135deg, #d3f9d8 0%, #b2f2bb 100%);
}

.mood-btn[data-mood="good"]:hover,
.mood-btn[data-mood="good"].selected {
    border-color: var(--mood-good);
    background: linear-gradient(135deg, #d0ebff 0%, #a5d8ff 100%);
}

.mood-btn[data-mood="ok"]:hover,
.mood-btn[data-mood="ok"].selected {
    border-color: var(--mood-ok);
    background: linear-gradient(135deg, #fff9db 0%, #ffec99 100%);
}

.mood-btn[data-mood="anxious"]:hover,
.mood-btn[data-mood="anxious"].selected {
    border-color: var(--mood-anxious);
    background: linear-gradient(135deg, #ffe3e3 0%, #ffc9c9 100%);
}

.mood-btn[data-mood="low"]:hover,
.mood-btn[data-mood="low"].selected {
    border-color: var(--mood-low);
    background: linear-gradient(135deg, #e7dbff 0%, #d0bfff 100%);
}

.mood-btn[data-mood="not-themselves"]:hover,
.mood-btn[data-mood="not-themselves"].selected {
    border-color: var(--mood-not);
    background: linear-gradient(135deg, #ffe8cc 0%, #ffd8a8 100%);
}

.mood-btn .emoji {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.mood-btn:hover .emoji {
    transform: scale(1.1) rotate(5deg);
}

.mood-btn .label {
    font-size: 0.85rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    color: var(--text-primary);
}

/* Form Sections */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-section textarea,
.form-section input[type="text"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: white;
    transition: all 0.3s ease;
}

.form-section textarea:focus,
.form-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.15);
    transform: translateY(-2px);
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
    border: 2px solid transparent;
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.tag.selected {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #ff9f66 100%);
    border-color: white;
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.5);
    transform: scale(1.1);
}

.tag .tag-remove {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-tag-add {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    border-radius: 24px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.btn-tag-add:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.6);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.5);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #ff9f66 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #fb7185 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(248, 113, 113, 0.4);
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.btn-large {
    padding: 1.25rem;
    font-size: 1rem;
    margin-top: 1.5rem;
    border-radius: 20px;
}

/* Logged Message */
.logged-message {
    background: linear-gradient(135deg, #d3f9d8 0%, #b2f2bb 100%);
    border: 2px solid var(--mood-great);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(81, 207, 102, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logged-message p {
    margin-bottom: 1rem;
    color: #065f46;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Timeline */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filters select {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.9rem;
    background: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-month {
    margin-bottom: 2rem;
}

.timeline-month h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%) 1;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.timeline-entry {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.1);
    margin-bottom: 0.75rem;
}

.timeline-entry:hover {
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.25);
    transform: translateX(8px) scale(1.02);
    border-color: var(--primary-color);
}

.timeline-entry-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-weight: 600;
    min-width: 60px;
    color: var(--text-primary);
}

.timeline-mood {
    font-size: 1.5rem;
}

.timeline-pet {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.timeline-note {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-entry-tags .tag {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
}

/* Insights */
.insights-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.insight-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.insight-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255, 140, 66, 0.2);
}

.insight-box h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.insight-box p {
    color: var(--text-secondary);
    line-height: 1.8;
}

#mood-chart {
    max-height: 250px;
}

.tag-correlation {
    padding: 1rem;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8cc 100%);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.tag-correlation:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
}

.tag-correlation strong {
    color: var(--text-primary);
}

/* Settings */
.settings-section {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.settings-section:hover {
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.15);
}

.settings-section h3 {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.pet-item,
.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8cc 100%);
    border-radius: 16px;
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.pet-item:hover,
.tag-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.2);
}

.pet-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.pet-birthday-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.pet-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.pet-item span,
.tag-item span {
    font-weight: 500;
}

.settings-section .btn-secondary {
    margin-top: 0.5rem;
    width: 100%;
}

.settings-section .btn-danger {
    margin-top: 1rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 40px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 240, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-top: 2px solid var(--border-color);
    border-bottom: none;
    display: flex;
    justify-content: space-around;
    padding: 0.875rem 0;
    box-shadow: 0 -4px 20px rgba(255, 140, 66, 0.15);
    z-index: 1000;
    border-radius: 0;
}

/* Footer */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 248, 240, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-top: none;
    padding: 0.5rem 1rem;
    text-align: center;
    z-index: 999;
    margin-top: 0;
}

.footer-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.footer-separator {
    margin: 0 0.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    position: relative;
    border-radius: 12px;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0 0 3px 3px;
    transition: width 0.3s ease;
}

.nav-btn.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-btn.active::before {
    width: 60%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    flex: 1;
}

/* Legal Content */
.legal-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 700;
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-content strong:first-child {
    margin-top: 0;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.legal-content em {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (min-width: 768px) {
    .content {
        padding: 2rem;
    }

    .mood-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 500px;
        margin: 0 auto 1.5rem;
    }

    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
        bottom: 40px;
    }

    .app-footer {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 12px 12px;
    }
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    background: #faf8f5;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(221, 160, 221, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 218, 185, 0.1) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.landing-page::before {
    content: '🐾';
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.landing-page::after {
    content: '⭐';
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.1;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(100px, -50px) rotate(90deg); }
    50% { transform: translate(-50px, 100px) rotate(180deg); }
    75% { transform: translate(50px, -100px) rotate(270deg); }
}

.landing-container {
    max-width: 1400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.login-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-logo {
    margin-bottom: 0.5rem;
}

.logo-img {
    height: 140px;
    width: auto;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 700;
    color: #5d4037;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.cta-button {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.4);
    margin-top: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(255, 140, 66, 0.5);
    background: linear-gradient(135deg, #ff7a2e 0%, #ff5722 100%);
}

.cta-icon {
    font-size: 1.5rem;
}

.cta-subtext {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0.5rem 0 0 0;
}

.hero-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    z-index: 2;
    width: 320px;
    max-width: 100%;
}

.phone-screen {
    background: white;
    border-radius: 32px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 8px solid #2d2d2d;
}

.mockup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.mockup-menu {
    font-size: 1.2rem;
    color: #6b7280;
}

.mockup-logo-small {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.mockup-pet-select {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.mockup-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mockup-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mockup-question {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.mockup-moods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mockup-mood {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mockup-mood.selected {
    background: #fef3c7;
    border-color: #fbbf24;
    color: var(--text-primary);
}

.mockup-notes {
    margin-top: 0.5rem;
}

.mockup-notes label,
.mockup-tags label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mockup-notes textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    resize: none;
    background: #f9fafb;
}

.pet-illustrations {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.pet-cat {
    position: absolute;
    left: -80px;
    top: 20%;
    font-size: 4rem;
    transform: rotate(-15deg);
    animation: floatPet 6s ease-in-out infinite;
}

.pet-dog {
    position: absolute;
    right: -60px;
    top: 30%;
    font-size: 4rem;
    transform: rotate(15deg);
    animation: floatPet 8s ease-in-out infinite;
}

.pet-bowl {
    position: absolute;
    left: -60px;
    bottom: 10%;
    font-size: 3rem;
    animation: floatPet 7s ease-in-out infinite;
}

@keyframes floatPet {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.app-container {
    display: none;
}

/* Hide landing page when app is shown */
body.show-app .landing-page {
    display: none;
}

body.show-app .app-container {
    display: block;
}

body.show-landing .app-container {
    display: none;
}

/* Landing page responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-right {
        order: -1;
    }

    .phone-mockup {
        width: 280px;
    }

    .pet-illustrations {
        display: none;
    }
}

@media (max-width: 768px) {
    .landing-container {
        padding: 2rem 1.5rem;
    }

    .login-btn {
        top: 1.5rem;
        right: 1.5rem;
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .phone-mockup {
        width: 260px;
    }
}
