/* Period Tracker Stylesheet */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    --light: #f7fafc;
    --dark: #2d3748;
    --border: #e2e8f0;
    --text: #2d3748;
    --text-muted: #718096;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

.btn-icon {
    display: inline-block;
    padding: 8px 12px;
    color: var(--primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.1);
}

.btn-delete {
    color: var(--danger);
}

.btn-delete:hover {
    background: rgba(245, 101, 101, 0.1);
}

/* Cards */
.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 22px;
}

/* Predictions Grid */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.prediction-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.prediction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.prediction-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.prediction-card.primary .prediction-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.prediction-card.success .prediction-icon {
    background: var(--success);
    color: white;
}

.prediction-card.info .prediction-icon {
    background: var(--info);
    color: white;
}

.prediction-card.secondary .prediction-icon {
    background: #6c757d;
    color: white;
}

.prediction-card.fertile-active .prediction-icon {
    background: #48bb78;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.prediction-content h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.prediction-date {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.prediction-detail {
    font-size: 13px;
    color: var(--text-muted);
}

/* Stats Bar */
.stats-bar {
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.stat i {
    color: var(--primary);
    font-size: 18px;
}

/* Welcome Card */
.welcome-card {
    background: white;
    padding: 60px 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.welcome-card i {
    color: var(--primary);
    margin-bottom: 20px;
}

.welcome-card h2 {
    color: var(--dark);
    margin-bottom: 15px;
}

.welcome-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 16px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.cycle-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.cycle-table th,
.cycle-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cycle-table th {
    background: var(--light);
    color: var(--dark);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.cycle-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.cycle-table .actions {
    display: flex;
    gap: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.badge-gray {
    background: #6c757d;
}

/* Notes Preview */
.notes-preview {
    color: var(--text-muted);
    font-style: italic;
    font-size: 13px;
    cursor: help;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="date"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 18px;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fff5f5;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Info Box */
.info-box {
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    color: #2c5282;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box ul {
    margin-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
}

/* Home Link */
.home-link {
    text-align: center;
    margin-top: 30px;
}

.home-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.home-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
    }
    
    .predictions-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card {
        padding: 20px;
    }
    
    .cycle-table {
        font-size: 14px;
    }
    
    .cycle-table thead {
        display: none;
    }
    
    .cycle-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 10px;
    }
    
    .cycle-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border: none;
    }
    
    .cycle-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 12px;
    }
    
    .cycle-table .actions {
        justify-content: flex-end;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .prediction-card {
        flex-direction: column;
        text-align: center;
    }
    
    .prediction-content {
        width: 100%;
    }
}
