:root {
    --primary: #ff4757;
    /* Red for Period */
    --primary-light: #ff7f7f;
    --secondary: #5f27cd;
    /* Purple for Ovulation */
    --fertile: #2ed573;
    /* Green for Fertile */
    --text: #2d3436;
    --bg: #fff5f7;
    --card-bg: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 15px;
    position: relative;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe4e9 100%);
    transition: opacity 0.5s ease;
}

.hidden {
    display: none !important;
}

.subtitle {
    font-size: 16px;
    color: #636e72;
    margin-top: 5px;
}

header {
    margin-bottom: 10px;
}

h1 {
    font-size: 26px;
    font-weight: 600;
    color: var(--primary);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    padding: 5px 0;
}

/* Onboarding */
.onboarding-view {
    justify-content: center;
}

.onboarding-step {
    animation: slideIn 0.5s ease-out;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid rgba(255, 143, 163, 0.2);
    font-size: 16px;
    font-family: inherit;
    background: white;
    box-shadow: var(--shadow);
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
}

.input-hint {
    font-size: 12px;
    color: #b2bec3;
    margin-top: 8px;
}

.scrollable-form {
    overflow-y: auto !important;
    padding-bottom: 30px;
}

.onboarding-content {
    display: flex;
    flex-direction: column;
}

.w-100 {
    width: 100%;
}

/* Dashboard & Cards */
.status-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 15px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 5px;
}

.status-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #636e72;
}

.status-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin: 2px 0;
    color: var(--secondary);
}

.status-sub {
    font-size: 14px;
    color: #b2bec3;
}

main {
    flex: 1;
    overflow-y: auto;
}

.calendar-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.calendar-header button {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary);
    cursor: pointer;
    padding: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.day-name {
    font-size: 12px;
    font-weight: 600;
    color: #b2bec3;
    padding-bottom: 10px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-column: span 7;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin: 1px;
}

.day.today {
    border: 2px solid #95a5a6;
    /* Gray for today */
    font-weight: 600;
    animation: slowBlink 2s infinite ease-in-out;
}

.day.period {
    border: 2px solid var(--primary);
    background-color: white;
    color: var(--primary);
}

.day.fertile {
    background-color: var(--fertile);
    color: white;
}

.day.ovulation {
    border: 3px solid var(--secondary);
    background-color: var(--fertile);
    color: white;
}

.day.marge {
    background-color: #f1c40f;
    /* Yellow */
    color: white;
}

.day.not-current-month {
    color: #dfe6e9;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b81 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.3);
    transition: transform 0.2s, opacity 0.3s;
}

.primary-btn:active {
    transform: scale(0.98);
}

.legend {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    color: #636e72;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.period {
    border: 2px solid var(--primary);
    background-color: white;
}

.dot.fertile {
    background-color: var(--fertile);
}

.dot.ovulation {
    border: 2px solid var(--secondary);
    background-color: var(--fertile);
}

.dot.marge {
    background-color: #f1c40f;
}

footer {
    padding-top: 10px;
}

.nav-bar {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.nav-item {
    background: none;
    border: none;
    font-size: 12px;
    color: #b2bec3;
    padding: 5px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary);
    font-weight: 600;
}

#new-profile {
    color: #3498db;
    /* Blue */
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 25px;
    width: 85%;
    max-width: 400px;
    text-align: center;
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffb6c1 0%, #ff6b81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-box {
    background: white;
    padding: 40px 30px;
    border-radius: 30px;
    width: 85%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.auth-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.auth-box h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.auth-box p {
    font-size: 14px;
    color: #636e72;
    margin-bottom: 25px;
}

.error-msg {
    color: var(--primary);
    font-size: 13px;
    margin-top: 15px;
    font-weight: 500;
}

/* Profile Selection */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

.profile-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.profile-card:active {
    transform: scale(0.98);
}

.profile-info h3 {
    font-size: 18px;
    color: var(--text);
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-menu-btn {
    font-size: 24px;
    color: var(--primary);
    padding: 5px 10px;
    cursor: pointer;
    border: none;
    background: none;
    line-height: 1;
}

.modal-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.secondary-btn {
    background: #dfe6e9;
    color: #2d3436;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: #ced6e0;
}

.profile-info p {
    font-size: 12px;
    color: #b2bec3;
}

.profile-arrow {
    color: var(--primary);
    font-weight: bold;
}

.mt-20 {
    margin-top: 20px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slowBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}
