:root {
    --color-period: #d32f2f;
    --color-fertile: #f48fb1;
    --color-ovulation: #7b1fa2;
    --color-primary: #7b1fa2;
    --color-secondary: #f48fb1;
    --color-success: #4caf50;
    --color-warning: #ff9800;
    --color-error: #f44336;
    --color-border: #e0e0e0;
    --color-bg-light: #f5f5f5;
}

* {
    box-sizing: border-box;
}

.menstrual-tracker-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

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

.mt-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    margin: 20px;
}

.mt-modal-content h2 {
    color: var(--color-primary);
    margin-top: 0;
}

.mt-modal-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.mt-consent-actions {
    margin-top: 20px;
    text-align: right;
}

.mt-form-group {
    margin-bottom: 20px;
}

.mt-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.mt-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.mt-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.mt-help-text {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.mt-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.mt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.mt-btn-primary:hover {
    background-color: #6a1b9a;
}

.mt-btn-secondary {
    background-color: var(--color-bg-light);
    color: #333;
    border: 1px solid var(--color-border);
}

.mt-btn-secondary:hover {
    background-color: #e0e0e0;
}

.mt-btn-danger {
    background-color: var(--color-error);
    color: white;
}

.mt-btn-danger:hover {
    background-color: #c62828;
}

.mt-btn-large {
    padding: 15px 30px;
    font-size: 18px;
    width: 100%;
    margin-top: 10px;
}

.mt-results-header {
    margin-bottom: 30px;
}

.mt-results-header h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.mt-confidence {
    margin: 20px 0;
}

.mt-confidence-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    margin-bottom: 10px;
}

.mt-confidence-message {
    color: #666;
    font-size: 14px;
}

.mt-calendar {
    margin: 30px 0;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
}

.mt-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mt-calendar-header h3 {
    margin: 0;
    color: var(--color-primary);
}

.mt-calendar-nav {
    background: none;
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

.mt-calendar-nav:hover {
    background-color: var(--color-bg-light);
}

.mt-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.mt-calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    color: #666;
    font-size: 14px;
}

.mt-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.mt-calendar-day:hover {
    transform: scale(1.05);
}

.mt-calendar-day-empty {
    border: none;
    cursor: default;
}

.mt-calendar-day-empty:hover {
    transform: none;
}

.mt-calendar-day-today {
    font-weight: bold;
    border: 2px solid var(--color-primary);
}

.mt-calendar-day-period {
    background-color: #ffebee;
    color: var(--color-period);
    font-weight: 500;
}

.mt-calendar-day-fertile {
    background-color: #fce4ec;
    color: var(--color-ovulation);
}

.mt-calendar-day-ovulation {
    background-color: #f3e5f5;
    color: var(--color-ovulation);
    font-weight: bold;
}

.mt-events-list {
    margin: 30px 0;
}

.mt-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mt-event {
    display: flex;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.mt-event-period {
    background-color: #ffebee;
    border-left-color: var(--color-period);
}

.mt-event-fertile {
    background-color: #fce4ec;
    border-left-color: var(--color-fertile);
}

.mt-event-ovulation {
    background-color: #f3e5f5;
    border-left-color: var(--color-ovulation);
}

.mt-event-date {
    min-width: 120px;
    font-weight: 500;
    color: #666;
}

.mt-event-details strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.mt-event-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.mt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.mt-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin-top: 30px;
}

.mt-disclaimer p {
    margin: 0;
    color: #856404;
}

.mt-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.mt-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.mt-log-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.mt-log-history {
    margin-top: 30px;
}

.mt-log-history h4 {
    color: var(--color-primary);
}

.mt-log-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mt-log-item {
    padding: 15px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.mt-log-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.mt-log-item p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.mt-danger-zone {
    margin-top: 30px;
    padding: 20px;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
}

.mt-danger-zone h4 {
    margin-top: 0;
    color: var(--color-error);
}

.mt-danger-zone button {
    margin-right: 10px;
    margin-top: 10px;
}

.mt-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mt-toast-success {
    background-color: var(--color-success);
}

.mt-toast-error {
    background-color: var(--color-error);
}

.mt-toast-warning {
    background-color: var(--color-warning);
}

.mt-toast-info {
    background-color: #2196f3;
}

@media (max-width: 768px) {
    .menstrual-tracker-app {
        padding: 10px;
    }
    
    .mt-calendar-grid {
        gap: 4px;
    }
    
    .mt-calendar-day {
        font-size: 14px;
    }
    
    .mt-event {
        flex-direction: column;
    }
    
    .mt-event-date {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .mt-actions {
        flex-direction: column;
    }
    
    .mt-actions button {
        width: 100%;
    }
    
    .mt-checkbox-group {
        grid-template-columns: 1fr;
    }
}

@media print {
    .mt-actions,
    .mt-btn,
    .mt-modal {
        display: none !important;
    }
}
