/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6C5CE7;
    --primary-dark: #5848C2;
    --secondary-color: #00B894;
    --accent-color: #FD79A8;
    --dry-color: #FFD93D;
    --wet-color: #74B9FF;
    --bg-color: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #2D3436;
    --text-light: #636E72;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-google, .btn-large {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.btn-full {
    width: 100%;
}

.btn-google {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-google:hover {
    background: #F5F5F5;
}

.google-icon {
    font-weight: bold;
    color: #4285F4;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-content {
    text-align: left;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-illustration {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.hero-emoji {
    font-size: 4rem;
    position: absolute;
    animation: twinkle 2s ease-in-out infinite;
}

.hero-emoji:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.hero-emoji:nth-child(2) {
    top: 50%;
    left: 50%;
    animation-delay: 0.5s;
}

.hero-emoji:nth-child(3) {
    bottom: 20%;
    right: 20%;
    animation-delay: 1s;
}

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

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Features Section */
.features {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
}

/* About Section */
.about {
    background: var(--white);
    padding: 4rem 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Auth Page */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.auth-form h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.input-field {
    width: 100%;
    padding: 0.875rem;
    margin-bottom: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-message {
    background: #FFE5E5;
    color: #D63031;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Dashboard */
.dashboard-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.welcome-section {
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.welcome-text {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Quick Log */
.quick-log {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.quick-log h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.log-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-dry, .btn-wet {
    padding: 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-dry {
    background: linear-gradient(135deg, #FFD93D, #FFA502);
    color: var(--white);
}

.btn-dry:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.btn-wet {
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    color: var(--white);
}

.btn-wet:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.log-icon {
    font-size: 3rem;
}

/* Stats Section */
.stats-section {
    margin-bottom: 2rem;
}

.stats-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Calendar */
.calendar-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.calendar-section h2, .calendar-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.calendar {
    width: 100%;
}

.calendar-header {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calendar-day-label {
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: var(--bg-color);
    position: relative;
    transition: all 0.3s;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.dry {
    background: linear-gradient(135deg, #FFD93D, #FFA502);
    color: var(--white);
}

.calendar-day.wet {
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    color: var(--white);
}

.calendar-day.today {
    border: 3px solid var(--primary-color);
}

.day-number {
    font-weight: 600;
    font-size: 1rem;
}

.day-icon {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

/* Parent Dashboard */
.children-list {
    margin-bottom: 2rem;
}

.children-list h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.child-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.child-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.child-card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.child-card-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.btn-view {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view:hover {
    background: var(--primary-dark);
}

.child-detail {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.child-detail h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-buttons button {
    flex: 1;
}

/* Loading Screen */
.loading-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.loader {
    border: 4px solid var(--bg-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #00B894, #00CEC9);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.success-icon {
    font-size: 2rem;
}

/* Guardian Section */
.guardian-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.guardian-section h2 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.guardian-connected {
    margin-top: 1rem;
}

.info-card {
    background: linear-gradient(135deg, #00B894, #00CEC9);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guardian-form {
    margin-top: 1rem;
}

.guardian-form p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .input-field {
    flex: 1;
    margin-bottom: 0;
}

.form-row .btn-primary {
    white-space: nowrap;
}

/* Calendar Enhancements */
.calendar-hint {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.calendar-day.editable {
    cursor: pointer;
    transition: transform 0.2s;
}

.calendar-day.editable:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.log-hint {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Danger Button */
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: #D63031;
    color: var(--white);
}

.btn-danger:hover {
    background: #C0392B;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Connection Requests */
.requests-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.requests-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.request-card {
    background: var(--bg-color);
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.request-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.request-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.request-icon {
    font-size: 3rem;
    background: var(--primary-color);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.request-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.request-details strong {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.request-email {
    color: var(--text-light);
    font-size: 0.9rem;
}

.request-date {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.request-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-accept {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--secondary-color);
    color: var(--white);
}

.btn-accept:hover {
    background: #00A383;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-decline {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid #E0E0E0;
}

.btn-decline:hover {
    background: #F5F5F5;
    border-color: var(--text-light);
}

/* Settings */
.settings-section {
    padding: 1.5rem;
    background: #FFF5F5;
    border: 2px solid #FFC9C9;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.settings-section h4 {
    color: #D63031;
    margin-bottom: 1rem;
}

.settings-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.settings-section li {
    margin: 0.5rem 0;
    color: var(--text-dark);
}

.warning-text {
    color: #D63031;
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-illustration {
        width: 200px;
        height: 200px;
    }
    
    .hero-emoji {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .log-buttons {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .children-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .day-icon {
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .request-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .request-info {
        width: 100%;
    }
    
    .request-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-accept, .btn-decline {
        width: 100%;
    }
}

