/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.footer-email {
    color: var(--primary-pink);
    font-weight: bold;
    font-size: 1.1em;
    text-decoration: underline;
}
:root {
    --primary-pink: #ff6b9d;
    --primary-purple: #c44569;
    --secondary-blue: #74b9ff;
    --accent-mint: #00cec9;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #ffeaa7;
    --bg-gradient: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #74b9ff 100%);
    --shadow: 0 10px 30px rgba(196, 69, 105, 0.2);
    --border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: bold;
    margin-bottom: 1rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--bg-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.9);
}

.section__title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature__card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature__card:hover {
    transform: translateY(-5px);
}

.feature__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    fill: var(--primary-pink);
}

.feature__title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature__description {
    color: var(--text-light);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.1);
}

/* Period History Section */
.period-history {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.add-period-btn {
    background: var(--primary-pink);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.add-period-btn:hover {
    background: var(--primary-purple);
}

.period-list {
    display: grid;
    gap: 1rem;
}

.period-entry {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.period-entry:hover {
    background: #e9ecef;
}

.period-info {
    flex: 1;
}

.period-date {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.period-details {
    font-size: 0.9rem;
    color: var(--text-light);
}

.period-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    background: var(--secondary-blue);
    color: white;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e74c3c;
    color: white;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
}

.tracker-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
    cursor: pointer;
}

/* Flow Intensity Colors */
.calendar-day.period.light {
    background: #ffb3c8;
}

.calendar-day.period.medium {
    background: #ff6b9d;
}

.calendar-day.period.heavy {
    background: #c44569;
}

/* Calendar */
.calendar-container {
    margin-top: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    background: var(--bg-gradient);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
}

.nav-btn {
    background: var(--primary-pink);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary-purple);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
}

.calendar-day-header {
    background: #f8f9fa;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.calendar-day {
    background: white;
    padding: 0.75rem 0.5rem;
    min-height: 60px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: #ccc;
    background: #f8f9fa;
}

.calendar-day.period {
    background: #ff6b9d;
    color: white;
}

.calendar-day.fertile {
    background: #74b9ff;
    color: white;
}

.calendar-day.ovulation {
    background: #00cec9;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 3px solid var(--primary-purple);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    flex-wrap: wrap;
    border-top: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.legend-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

/* Style specific legend colors to match calendar */
.legend-item:nth-child(1) .legend-color { background: #ffb3c8; }  /* Light Flow */
.legend-item:nth-child(2) .legend-color { background: #ff6b9d; }  /* Medium Flow */
.legend-item:nth-child(3) .legend-color { background: #c44569; }  /* Heavy Flow */
.legend-item:nth-child(4) .legend-color { background: #74b9ff; }  /* Fertile Window */
.legend-item:nth-child(5) .legend-color { background: #00cec9; }  /* Ovulation */
.legend-item:nth-child(6) .legend-color {                         /* Today */
    background: white;
    border: 2px solid #c44569;
}

/* Add visual emphasis to legend items */
.legend-item span {
    color: var(--text-dark);
}

.export-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1rem;
    background: #f8f9fa;
}

/* Notification Styles */
.notification {
    position: relative;
}

.notification__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: var(--primary-pink);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(196, 69, 105, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    z-index: 2;
}
.notification__close:hover,
.notification__close:focus {
    background: var(--primary-pink);
    color: #fff;
    box-shadow: 0 4px 12px rgba(196, 69, 105, 0.18);
    outline: none;
}

/* FAQ Section */
.faq {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.9);
}

.faq__container {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    background: white;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq__question {
    background: none;
    border: none;
    width: 100%;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq__question:hover {
    background: #f8f9fa;
}

.faq__answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq__answer.active {
    padding: 1.5rem;
    max-height: 200px;
}

.faq__toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq__toggle.active {
    transform: rotate(45deg);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Ad Container Styles */
.ad-container {
    text-align: center;
    margin: 2rem auto;
    overflow: hidden;
    max-width: 100%;
    padding: 1rem;
}

.native-banner {
    max-width: 100%;
    padding: 1.5rem 0;
    background: transparent;
    box-shadow: none;
}

.leaderboard {
    max-width: 728px;
}

.medium-rectangle {
    max-width: 300px;
}

.mobile-banner {
    max-width: 320px;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .features, .how-it-works, .faq {
        padding: 2rem 0;
    }
    
    .calendar-legend {
        gap: 1rem;
    }
    
    .export-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .export-buttons, .calendar-nav {
        display: none;
    }
    
    .calendar-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}
