/* Japan-Indo Horoscope - Cosmic Theme CSS */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* === Base Reset & Typography === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: radial-gradient(ellipse at top, #080e21 0%, #1b2735 95%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* === Container & Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    border: 3px solid #d4af37;
}

.header {
    background: linear-gradient(135deg, #1a237e 0%, #303f9f 50%, #3f51b5 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.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 Styles === */
.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;
}

/* === Buttons === */
.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%);
}

.calculate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === Results & Cards === */
.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;
}

/* === Zen Divider === */
.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 Background Animation === */
.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 animations */
.meteor-1, .meteor-2, .meteor-3, .meteor-4, .meteor-5, .meteor-6, .meteor-7, .meteor-8, 
.meteor-9, .meteor-10, .meteor-11, .meteor-12, .meteor-13, .meteor-14, .meteor-15 {
    position: absolute;
    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 { top: 63px; left: 17%; animation-duration: 6.2s; }
.meteor-2 { top: 156px; left: 87%; animation-duration: 9.4s; }
.meteor-3 { top: 234px; left: 43%; animation-duration: 7.8s; }
.meteor-4 { top: 89px; left: 72%; animation-duration: 5.5s; }
.meteor-5 { top: 298px; left: 25%; animation-duration: 8.9s; }
.meteor-6 { top: 167px; left: 94%; animation-duration: 6.7s; }
.meteor-7 { top: 123px; left: 58%; animation-duration: 4.3s; }
.meteor-8 { top: 276px; left: 11%; animation-duration: 9.1s; }
.meteor-9 { top: 198px; left: 76%; animation-duration: 7.2s; }
.meteor-10 { top: 87px; left: 39%; animation-duration: 5.8s; }
.meteor-11 { top: 245px; left: 82%; animation-duration: 8.6s; }
.meteor-12 { top: 134px; left: 21%; animation-duration: 6.9s; }
.meteor-13 { top: 287px; left: 65%; animation-duration: 4.7s; }
.meteor-14 { top: 76px; left: 48%; animation-duration: 9.8s; }
.meteor-15 { top: 209px; left: 91%; animation-duration: 3.4s; }

.meteor-1:before, .meteor-2:before, .meteor-3:before, .meteor-4:before, .meteor-5:before, 
.meteor-6:before, .meteor-7:before, .meteor-8:before, .meteor-9:before, .meteor-10:before, 
.meteor-11:before, .meteor-12:before, .meteor-13:before, .meteor-14:before, .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;
    }
}

/* === Cosmic 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;
    }
}

/* === Utility Classes === */
#results-section {
    display: none;
}

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

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

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

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

.card {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* === Mobile Responsive === */
@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;
    }
    
    .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%;
    }
    
    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;
    }
    
    .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;
        padding: 10px;
    }
    
    .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;
    }
    
    #marriage-results-section .card {
        padding: 15px !important;
    }
    
    #marriage-results-section h4 {
        font-size: 16px !important;
    }
    
    #marriage-results-section p {
        font-size: 14px !important;
    }
    
    .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) {
    .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;
    }
    
    .japanese-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    h2, h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    .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;
    }
}