@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
    /* Pregnancy Theme Colors - Feminine & Maternal */
    --primary: #EC4899;
    /* Pink 500 */
    --primary-dark: #DB2777;
    --primary-light: #F472B6;
    --secondary: #8B5CF6;
    /* Purple 500 */
    --accent: #F59E0B;
    /* Amber for highlights */
    --dark: #1E1E2E;
    /* Soft dark */
    --dark-surface: #2D2D3F;
    --light: #FDF2F8;
    /* Pink tinted white */
    --text-main: #FFFFFF;
    --text-muted: #C4B5D4;

    /* Glassmorphism */
    --glass-bg: rgba(45, 45, 63, 0.7);
    --glass-border: rgba(236, 72, 153, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(236, 72, 153, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text-main);
    direction: rtl;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 60%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-muted {
    color: var(--text-muted);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #7C3AED);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.navbar {
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(30, 30, 46, 0.9);
    backdrop-filter: blur(10px);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--primary);
}

.logo span {
    color: var(--primary);
}

.hero {
    padding: 4rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.tool-card {
    padding: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.2);
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: rgba(236, 72, 153, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
}

footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
}

/* Form Elements */
input,
select {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--glass-border);
    background: var(--dark-surface);
    color: white;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23EC4899' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
    cursor: pointer;
    text-align: right;
    direction: rtl;
}

select option {
    background: var(--dark-surface);
    color: white;
    padding: 0.75rem;
    direction: rtl;
    text-align: right;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Progress Bar */
.progress-bar {
    background: var(--dark-surface);
    border-radius: 1rem;
    height: 20px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    transition: width 0.5s ease;
}

/* Result Cards */
.result-card {
    padding: 1.5rem;
    text-align: center;
    border-radius: 1rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

.result-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Pregnancy specific */
.trimester-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.trimester-1 {
    background: rgba(236, 72, 153, 0.2);
    color: var(--primary);
}

.trimester-2 {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
}

.trimester-3 {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent);
}