.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: starField 20s linear infinite;
}

@keyframes starField {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.main-content {
    padding: 50px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.person-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 35px;
    border-radius: 20px;
    border: 2px solid #e3f2fd;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    position: relative;
}

.person-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    border-radius: 20px 20px 0 0;
}

.person-form h3 {
    color: #1a237e;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #424242;
    font-size: 0.95rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1f5fe;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-group input[readonly] {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    color: #2e7d32;
    cursor: not-allowed;
    border-color: #c8e6c9;
    font-weight: 500;
}

.form-group select:disabled {
    background: #f5f5f5;
    color: #9e9e9e;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.calculate-btn {
    display: block;
    width: 250px;
    margin: 0 auto;
    padding: 18px 35px;
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 50%, #ff5722 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.3);
    font-family: inherit;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.4);
    background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 50%, #f44336 100%);
}

.results {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px solid #e3f2fd;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 5px solid #d32f2f;
}

.compatibility-score {
    text-align: center;
    margin-bottom: 40px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border: 4px solid rgba(255,255,255,0.3);
}

.score-excellent { 
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%); 
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}
.score-good { 
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%); 
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
}
.score-average { 
    background: linear-gradient(135deg, #ff9800 0%, #ef6c00 100%); 
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.4);
}
.score-poor { 
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%); 
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.4);
}

.score-circle span {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.astro-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.astro-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e3f2fd;
}

.dosha-info {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    border-left: 5px solid #ff9800;
}

.japanese-section {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    padding: 30px;
    border-radius: 20px;
    margin-top: 40px;
    border: 2px solid #e91e63;
}

.explanation-card {
    background: rgba(255,255,255,0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #1976d2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
}

.tamil-section {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 2px solid #ffa000;
}

@media (max-width: 768px) {
    .form-grid, .astro-info {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .main-content {
        padding: 25px;
    }
    
    .header {
        padding: 25px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    /* Mobile-specific text wrapping */
    .explanation-card {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .explanation-card p, .explanation-card div {
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
    }
    
    /* Adjust grid for mobile */
    div[style*="grid-template-columns: repeat(auto-fit, minmax(380px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit, minmax(350px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Force all result grids to single column */
    .astro-info,
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }
    
    .explanation-card {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .explanation-card h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .explanation-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Container padding adjustments */
    .japanese-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    /* Text size adjustments */
    h2, h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    /* Force all inline grids to single column on small screens */
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* More specific overrides for result sections */
    .astro-info {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

.zen-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.zen-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.zen-divider span {
    background: white;
    padding: 0 20px;
    color: #d4af37;
    font-size: 1.5rem;
}

/* Meteor Shower Background */
.meteor-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.star {
    width: 1px;
    height: 1px;
    background: transparent;
    position: absolute;
    box-shadow: 
        345px 123px #fff, 1203px 456px #fff, 892px 789px #fff, 567px 234px #fff, 1456px 678px #fff,
        234px 890px #fff, 1789px 345px #fff, 678px 567px #fff, 1345px 234px #fff, 890px 678px #fff,
        456px 123px #fff, 1567px 890px #fff, 789px 345px #fff, 1234px 567px #fff, 567px 789px #fff,
        1890px 234px #fff, 345px 678px #fff, 1123px 456px #fff, 678px 890px #fff, 1456px 123px #fff,
        234px 567px #fff, 1789px 789px #fff, 567px 345px #fff, 1345px 678px #fff, 890px 234px #fff,
        456px 890px #fff, 1567px 123px #fff, 789px 567px #fff, 1234px 789px #fff, 345px 234px #fff,
        1890px 678px #fff, 567px 456px #fff, 1123px 890px #fff, 789px 123px #fff, 1456px 567px #fff,
        234px 345px #fff, 1789px 678px #fff, 456px 234px #fff, 1345px 890px #fff, 678px 123px #fff,
        1567px 456px #fff, 890px 789px #fff, 1234px 345px #fff, 567px 678px #fff, 1890px 567px #fff,
        345px 890px #fff, 1123px 234px #fff, 789px 678px #fff, 1456px 345px #fff, 234px 123px #fff,
        1789px 567px #fff, 567px 890px #fff, 1345px 234px #fff, 890px 456px #fff, 1567px 789px #fff,
        456px 345px #fff, 1234px 678px #fff, 789px 234px #fff, 1890px 890px #fff, 345px 567px #fff,
        1123px 123px #fff, 678px 789px #fff, 1456px 234px #fff, 567px 456px #fff, 1789px 345px #fff,
        234px 678px #fff, 1345px 567px #fff, 890px 890px #fff, 1567px 234px #fff, 456px 123px #fff,
        1234px 456px #fff, 789px 678px #fff, 1890px 345px #fff, 345px 234px #fff, 1123px 567px #fff,
        678px 345px #fff, 1456px 890px #fff, 567px 123px #fff, 1789px 456px #fff, 234px 789px #fff,
        1345px 345px #fff, 890px 567px #fff, 1567px 678px #fff, 456px 234px #fff, 1234px 890px #fff,
        789px 123px #fff, 1890px 456px #fff, 345px 789px #fff, 1123px 345px #fff, 678px 567px #fff,
        1456px 678px #fff, 567px 234px #fff, 1789px 890px #fff, 234px 456px #fff, 1345px 123px #fff,
        890px 789px #fff, 1567px 345px #fff, 456px 567px #fff, 1234px 234px #fff, 789px 890px #fff,
        1890px 123px #fff, 345px 456px #fff, 1123px 789px #fff, 678px 234px #fff, 1456px 567px #fff,
        567px 345px #fff, 1789px 678px #fff, 234px 234px #fff, 1345px 890px #fff, 890px 123px #fff,
        1567px 456px #fff, 456px 789px #fff, 1234px 567px #fff, 789px 345px #fff, 1890px 678px #fff,
        345px 123px #fff, 1123px 567px #fff, 678px 890px #fff, 1456px 234px #fff, 567px 456px #fff,
        1789px 123px #fff, 234px 567px #fff, 1345px 789px #fff, 890px 345px #fff, 1567px 678px #fff,
        456px 890px #fff, 1234px 123px #fff, 789px 567px #fff, 1890px 234px #fff, 345px 789px #fff,
        1123px 456px #fff, 678px 123px #fff, 1456px 789px #fff, 567px 567px #fff, 1789px 234px #fff,
        234px 890px #fff, 1345px 456px #fff, 890px 678px #fff, 1567px 123px #fff, 456px 234px #fff,
        1234px 789px #fff, 789px 456px #fff, 1890px 567px #fff, 345px 345px #fff, 1123px 890px #fff,
        678px 567px #fff, 1456px 123px #fff, 567px 789px #fff, 1789px 567px #fff, 234px 345px #fff,
        1345px 234px #fff, 890px 890px #fff, 1567px 567px #fff, 456px 456px #fff, 1234px 345px #fff,
        789px 890px #fff, 1890px 789px #fff, 345px 567px #fff, 1123px 234px #fff, 678px 678px #fff,
        1456px 456px #fff, 567px 123px #fff, 1789px 789px #fff, 234px 567px #fff, 1345px 567px #fff,
        890px 234px #fff, 1567px 890px #fff, 456px 678px #fff, 1234px 456px #fff, 789px 123px #fff,
        1890px 345px #fff, 345px 890px #fff, 1123px 678px #fff, 678px 234px #fff, 1456px 890px #fff,
        567px 345px #fff, 1789px 123px #fff, 234px 678px #fff, 1345px 345px #fff, 890px 567px #fff,
        1567px 234px #fff, 456px 890px #fff, 1234px 678px #fff, 789px 567px #fff, 1890px 890px #fff,
        345px 234px #fff, 1123px 123px #fff, 678px 456px #fff, 1456px 567px #fff, 567px 678px #fff,
        1789px 345px #fff, 234px 234px #fff, 1345px 789px #fff, 890px 456px #fff, 1567px 345px #fff,
        456px 567px #fff, 1234px 234px #fff, 789px 890px #fff, 1890px 456px #fff, 345px 678px #fff,
        1123px 890px #fff, 678px 567px #fff, 1456px 234px #fff, 567px 890px #fff, 1789px 678px #fff,
        234px 456px #fff, 1345px 123px #fff, 890px 789px #fff, 1567px 567px #fff, 456px 345px #fff,
        1234px 890px #fff, 789px 234px #fff, 1890px 567px #fff, 345px 456px #fff, 1123px 345px #fff,
        678px 789px #fff, 1456px 678px #fff, 567px 234px #fff, 1789px 890px #fff, 234px 567px #fff,
        1345px 456px #fff, 890px 123px #fff, 1567px 789px #fff, 456px 678px #fff, 1234px 567px #fff,
        789px 345px #fff, 1890px 234px #fff, 345px 890px #fff, 1123px 567px #fff, 678px 123px #fff,
        1456px 345px #fff, 567px 567px #fff, 1789px 234px #fff, 234px 789px #fff, 1345px 678px #fff,
        890px 890px #fff, 1567px 123px #fff, 456px 234px #fff, 1234px 456px #fff, 789px 678px #fff,
        1890px 123px #fff, 345px 567px #fff, 1123px 789px #fff, 678px 345px #fff, 1456px 890px #fff,
        567px 456px #fff, 1789px 567px #fff, 234px 123px #fff, 1345px 234px #fff, 890px 678px #fff,
        1567px 890px #fff, 456px 567px #fff, 1234px 123px #fff, 789px 789px #fff, 1890px 678px #fff,
        345px 234px #fff, 1123px 456px #fff, 678px 890px #fff, 1456px 123px #fff, 567px 345px #fff,
        1789px 456px #fff, 234px 890px #fff, 1345px 567px #fff, 890px 234px #fff, 1567px 678px #fff,
        456px 789px #fff, 1234px 345px #fff, 789px 567px #fff, 1890px 890px #fff, 345px 123px #fff,
        1123px 234px #fff, 678px 678px #fff, 1456px 567px #fff, 567px 890px #fff, 1789px 123px #fff,
        234px 345px #fff, 1345px 789px #fff, 890px 456px #fff, 1567px 234px #fff, 456px 123px #fff,
        1234px 789px #fff, 789px 456px #fff, 1890px 567px #fff, 345px 678px #fff, 1123px 890px #fff,
        678px 234px #fff, 1456px 234px #fff, 567px 678px #fff, 1789px 890px #fff, 234px 456px #fff,
        1345px 123px #fff, 890px 567px #fff, 1567px 345px #fff, 456px 890px #fff, 1234px 678px #fff,
        789px 234px #fff, 1890px 345px #fff, 345px 567px #fff, 1123px 123px #fff, 678px 789px #fff,
        1456px 890px #fff, 567px 234px #fff, 1789px 567px #fff, 234px 678px #fff, 1345px 345px #fff,
        890px 890px #fff, 1567px 567px #fff, 456px 456px #fff, 1234px 234px #fff, 789px 123px #fff,
        1890px 789px #fff, 345px 345px #fff, 1123px 678px #fff, 678px 567px #fff, 1456px 456px #fff,
        567px 123px #fff, 1789px 234px #fff, 234px 890px #fff, 1345px 890px #fff, 890px 345px #fff,
        1567px 123px #fff, 456px 567px #fff, 1234px 890px #fff, 789px 678px #fff, 1890px 234px #fff,
        345px 789px #fff, 1123px 345px #fff, 678px 456px #fff, 1456px 678px #fff, 567px 567px #fff,
        1789px 345px #fff, 234px 234px #fff, 1345px 678px #fff, 890px 123px #fff, 1567px 890px #fff,
        456px 234px #fff, 1234px 567px #fff, 789px 890px #fff, 1890px 456px #fff, 345px 123px #fff,
        1123px 789px #fff, 678px 345px #fff, 1456px 234px #fff, 567px 789px #fff, 1789px 678px #fff,
        234px 567px #fff, 1345px 456px #fff, 890px 678px #fff, 1567px 234px #fff, 456px 345px #fff,
        1234px 123px #fff, 789px 567px #fff, 1890px 890px #fff, 345px 456px #fff, 1123px 567px #fff,
        678px 123px #fff, 1456px 789px #fff, 567px 345px #fff, 1789px 123px #fff, 234px 789px #fff,
        1345px 234px #fff, 890px 567px #fff, 1567px 678px #fff, 456px 890px #fff, 1234px 456px #fff,
        789px 234px #fff, 1890px 678px #fff, 345px 890px #fff, 1123px 123px #fff, 678px 567px #fff,
        1456px 345px #fff, 567px 456px #fff, 1789px 890px #fff, 234px 123px #fff, 1345px 567px #fff,
        890px 789px #fff, 1567px 345px #fff, 456px 678px #fff, 1234px 789px #fff, 789px 123px #fff,
        1890px 567px #fff, 345px 234px #fff, 1123px 890px #fff, 678px 678px #fff, 1456px 123px #fff,
        567px 567px #fff, 1789px 456px #fff, 234px 345px #fff, 1345px 890px #fff, 890px 234px #fff,
        1567px 456px #fff, 456px 123px #fff, 1234px 345px #fff, 789px 789px #fff, 1890px 123px #fff;
}

.meteor-1 {
    position: absolute;
    top: 63px;
    left: 17%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 6.2s linear infinite;
}

.meteor-1:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-2 {
    position: absolute;
    top: 156px;
    left: 87%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 9.4s linear infinite;
}

.meteor-2:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-3 {
    position: absolute;
    top: 234px;
    left: 43%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 7.8s linear infinite;
}

.meteor-3:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-4 {
    position: absolute;
    top: 89px;
    left: 72%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 5.5s linear infinite;
}

.meteor-4:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-5 {
    position: absolute;
    top: 298px;
    left: 25%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 8.9s linear infinite;
}

.meteor-5:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-6 {
    position: absolute;
    top: 167px;
    left: 94%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 6.7s linear infinite;
}

.meteor-6:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-7 {
    position: absolute;
    top: 123px;
    left: 58%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 4.3s linear infinite;
}

.meteor-7:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-8 {
    position: absolute;
    top: 276px;
    left: 11%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 9.1s linear infinite;
}

.meteor-8:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-9 {
    position: absolute;
    top: 198px;
    left: 76%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 7.2s linear infinite;
}

.meteor-9:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-10 {
    position: absolute;
    top: 87px;
    left: 39%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 5.8s linear infinite;
}

.meteor-10:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-11 {
    position: absolute;
    top: 245px;
    left: 82%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 8.6s linear infinite;
}

.meteor-11:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-12 {
    position: absolute;
    top: 134px;
    left: 21%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 6.9s linear infinite;
}

.meteor-12:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-13 {
    position: absolute;
    top: 287px;
    left: 65%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 4.7s linear infinite;
}

.meteor-13:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-14 {
    position: absolute;
    top: 76px;
    left: 48%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 9.8s linear infinite;
}

.meteor-14:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

.meteor-15 {
    position: absolute;
    top: 209px;
    left: 91%;
    width: 300px;
    height: 1px;
    transform: rotate(-45deg);
    background-image: linear-gradient(to right, #fff, rgba(255,255,255,0));
    animation: meteor 3.4s linear infinite;
}

.meteor-15:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 5px;
    border-radius: 50%;
    margin-top: -2px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px 3px #fff;
}

@keyframes meteor {
    0% {
        opacity: 1;
        margin-top: -300px;
        margin-right: -300px;
    }
    12% {
        opacity: 0;
    }
    15% {
        margin-top: 300px;
        margin-left: -600px;
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Space-themed loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 14, 33, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.loader-container {
    text-align: center;
    color: white;
}

.cosmic-loader {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.planet {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #4fc3f7, #29b6f6, #0288d1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 20px rgba(79, 195, 247, 0.6),
        0 0 40px rgba(79, 195, 247, 0.4),
        0 0 60px rgba(79, 195, 247, 0.2);
    animation: planetSpin 2s linear infinite;
}

.planet::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: -10%;
    left: -10%;
    animation: ringRotate 3s linear infinite;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 120px;
    height: 120px;
    animation: orbitRotate 4s linear infinite;
}

.orbit-2 {
    width: 160px;
    height: 160px;
    animation: orbitRotate 6s linear infinite reverse;
}

.orbit-3 {
    width: 200px;
    height: 200px;
    animation: orbitRotate 8s linear infinite;
}

.orbit::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes planetSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes orbitRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    animation: textPulse 2s ease-in-out infinite;
}

.loader-subtext {
    font-size: 14px;
    opacity: 0.7;
    animation: textPulse 2s ease-in-out infinite 0.5s;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.cosmic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

.particle:nth-child(1) { width: 2px; height: 2px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 3px; height: 3px; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { width: 1px; height: 1px; left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { width: 2px; height: 2px; left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { width: 1px; height: 1px; left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { width: 3px; height: 3px; left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { width: 2px; height: 2px; left: 70%; animation-delay: 1.5s; }
.particle:nth-child(8) { width: 1px; height: 1px; left: 80%; animation-delay: 2.5s; }
.particle:nth-child(9) { width: 2px; height: 2px; left: 90%; animation-delay: 3.5s; }

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Hide results initially */
#results-section {
    display: none;
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile-responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
    }
    
    .header h1 {
        font-size: clamp(20px, 6vw, 28px) !important;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    input, select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
    }
    
    /* Gender radio buttons mobile layout */
    .form-group div[style*="justify-content: center"] {
        justify-content: flex-start !important;
        gap: 20px !important;
    }
    
    .calculate-btn {
        width: 100%;
        padding: 15px !important;
        font-size: 16px !important;
    }
    
    /* Results sections mobile optimization */
    #marriage-results-section .card {
        padding: 15px !important;
    }
    
    #marriage-results-section h4 {
        font-size: 16px !important;
    }
    
    #marriage-results-section p {
        font-size: 14px !important;
    }
    
    /* Privacy policy and disclaimer mobile styles */
    .privacy-agreement {
        padding: 12px !important;
        margin: 15px 0 !important;
    }
    
    .privacy-agreement label {
        font-size: 13px !important;
    }
    
    .privacy-agreement span span {
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px 10px !important;
        margin: 10px 0 !important;
    }
    
    .form-group div[style*="justify-content: center"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .form-group label[style*="min-width"] {
        min-width: auto !important;
    }
    
    .privacy-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}