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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

nav {
    background: rgba(255,255,255,0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-right a {
    color: #666;
    text-decoration: none;
}

.nav-right a:hover {
    color: #667eea;
}

.user-name {
    color: #999;
    font-size: 0.9rem;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-container {
    max-width: 400px;
    margin-top: 10vh;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
}

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

label {
    text-align: left;
    font-weight: 500;
    color: #555;
}

input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.info {
    margin-top: 1.5rem;
    color: #888;
    font-size: 0.9rem;
}

.children-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.child-tag {
    background: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.year-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.year-link {
    padding: 0.4rem 0.8rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
}

.year-link:hover {
    background: #764ba2;
}

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

.entry {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #888;
    flex-wrap: wrap;
}

.entry-child {
    color: #667eea;
    font-weight: 500;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.month-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.year-summary {
    color: #666;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #667eea;
    text-decoration: none;
}

.empty {
    text-align: center;
    color: #888;
    padding: 3rem;
}

@media (max-width: 600px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Admin styles */
.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.admin-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.admin-card form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-card select {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

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

.setup-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.setup-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.setup-header .phone {
    font-family: monospace;
    background: #e8e8e8;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.setup-header .birth {
    color: #888;
    font-size: 0.85rem;
}

.setup-members {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.member {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.member.parent {
    background: #d4edda;
    color: #155724;
}

.member.observer {
    background: #e2e3e5;
    color: #383d41;
}

.no-members {
    color: #888;
    font-style: italic;
    font-size: 0.85rem;
}

.webhook-url {
    display: block;
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    word-break: break-all;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.nav-right a.active {
    color: #667eea;
    font-weight: 600;
}

/* Edit child styles */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
}

.danger-zone {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.danger-zone h2 {
    color: #dc3545;
}

label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #555;
}

.admin-card form label {
    margin-top: 0.5rem;
}

.edit-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.edit-link:hover {
    text-decoration: underline;
}

/* Landing page styles */
body.landing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.landing-nav {
    background: transparent;
    padding: 1.5rem 2rem;
    box-shadow: none;
}

.landing-nav .logo {
    color: white;
}

.btn-login {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-login:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

.hero {
    text-align: center;
    padding: 4rem 2rem 6rem;
    color: white;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.btn-cta {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1rem 3rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.features, .example, .benefits {
    background: white;
    padding: 4rem 2rem;
}

.features h2, .example h2, .benefits h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

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

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.5;
}

.example {
    background: #f8f9fa;
}

.example-phone {
    max-width: 350px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 2rem 1rem;
}

.sms-bubble {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    margin-bottom: 0.75rem;
    max-width: 85%;
    position: relative;
}

.sms-bubble p {
    margin: 0;
    line-height: 1.4;
}

.sms-bubble.outgoing {
    background: #34c759;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.sms-bubble.incoming {
    background: #3a3a3c;
    color: white;
    border-bottom-left-radius: 4px;
}

.sms-time {
    font-size: 0.7rem;
    opacity: 0.7;
    display: block;
    margin-top: 0.3rem;
}

.benefits-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
}

.benefits-list li {
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.landing-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem;
}

/* Export bar */
.export-bar {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.export-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 6px;
    transition: background 0.2s;
}

.export-link:hover {
    background: #e0e0e0;
}

/* Export buttons */
.export-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-export {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-export:hover {
    background: #764ba2;
}
