/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B5CF6;
    --secondary-color: #06B6D4;
    --accent-color: #F59E0B;
    --dark-color: #1F2937;
    --light-color: #F9FAFB;
    --gradient-primary: linear-gradient(135deg, #8B5CF6, #06B6D4);
    --gradient-secondary: linear-gradient(135deg, #F59E0B, #EF4444);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s ease-in-out infinite alternate;
}

.constellation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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="1" fill="white" opacity="0.8"/><circle cx="80" cy="30" r="1" fill="white" opacity="0.6"/><circle cx="40" cy="70" r="1" fill="white" opacity="0.9"/><line x1="20" y1="20" x2="80" y2="30" stroke="white" stroke-width="0.5" opacity="0.3"/><line x1="80" y1="30" x2="40" y2="70" stroke="white" stroke-width="0.5" opacity="0.3"/></svg>') repeat;
    opacity: 0.5;
}

@keyframes sparkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Crimson Text', serif;
}

.gradient-text {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-width: 150px;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    min-width: 200px;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-family: 'Crimson Text', serif;
}

.section-header p {
    font-size: 1.1rem;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Section */
.calculator-section {
    background: white;
}

.calculator-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
}

.astrology-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    background: #F9FAFB;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #E5E7EB;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-actions {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.form-actions .btn {
    margin: 0 10px;
}

/* Location Suggestions */
.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.location-suggestion {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #F3F4F6;
    transition: var(--transition);
}

.location-suggestion:hover {
    background: var(--light-color);
}

/* Results Section */
.results-section {
    background: #F9FAFB;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark-color);
    font-family: 'Crimson Text', serif;
}

.chart-actions {
    display: flex;
    gap: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.result-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.result-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-card.chart-card {
    min-height: 400px;
}

/* Chart Containers */
.chart-container {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border-radius: var(--border-radius);
    position: relative;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    width: 280px;
    height: 280px;
    border: 2px solid var(--primary-color);
    background: white;
}

.chart-house {
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 4px;
    font-size: 0.8rem;
    background: white;
    transition: var(--transition);
    position: relative;
}

.chart-house:hover {
    background: #F0F9FF;
    transform: scale(1.05);
    z-index: 10;
}

.house-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.7rem;
    color: #6B7280;
    font-weight: 600;
}

.planet-symbol {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 1px;
}

/* Basic Info */
.basic-info {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #F9FAFB;
    border-radius: var(--border-radius);
}

.info-label {
    font-weight: 600;
    color: var(--dark-color);
}

.info-value {
    color: var(--primary-color);
    font-weight: 500;
}

/* Planetary Positions */
.planetary-positions {
    display: grid;
    gap: 0.5rem;
}

.planet-position {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 8px 12px;
    background: #F9FAFB;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.planet-name {
    font-weight: 600;
    color: var(--dark-color);
}

.planet-degree {
    text-align: center;
    color: var(--primary-color);
    font-family: monospace;
}

.planet-rashi {
    text-align: right;
    color: #6B7280;
}

/* Compatibility Section */
.compatibility-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.compatibility-section .section-header h2,
.compatibility-section .section-header p {
    color: white;
}

.compatibility-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-heavy);
}

.persons-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.person-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    backdrop-filter: blur(5px);
}

.person-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.person-form {
    display: grid;
    gap: 1rem;
}

.person-form input,
.person-form select {
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
}

.compatibility-connector {
    text-align: center;
    font-size: 2rem;
    color: #FFD700;
}

.compatibility-options {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #FFD700;
    border-color: #FFD700;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-color);
    font-weight: bold;
}

/* Compatibility Results */
.compatibility-results {
    background: white;
    padding: 4rem 0;
}

.compatibility-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-background {
    fill: none;
    stroke: #E5E7EB;
    stroke-width: 8;
}

.progress-ring-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s ease-in-out;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.score-label {
    font-size: 1rem;
    color: #6B7280;
    font-weight: 500;
}

.score-details {
    text-align: center;
}

.score-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.score-details p {
    font-size: 1.1rem;
    color: #6B7280;
}

/* Porutham Details */
.porutham-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.porutham-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    border-left: 4px solid transparent;
}

.porutham-item.compatible {
    border-left-color: #10B981;
}

.porutham-item.incompatible {
    border-left-color: #EF4444;
}

.porutham-item.partial {
    border-left-color: #F59E0B;
}

.porutham-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.porutham-name {
    font-weight: 600;
    color: var(--dark-color);
}

.porutham-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.porutham-status.compatible {
    background: #D1FAE5;
    color: #065F46;
}

.porutham-status.incompatible {
    background: #FEE2E2;
    color: #991B1B;
}

.porutham-status.partial {
    background: #FEF3C7;
    color: #92400E;
}

.porutham-description {
    color: #6B7280;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Behavior Section */
.behavior-section {
    background: #F9FAFB;
}

.behavior-results {
    margin-top: 2rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
}

.zodiac-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.zodiac-symbol {
    font-size: 2rem;
    margin: 0 5px;
    animation: bounce 2s infinite;
}

.zodiac-symbol:nth-child(1) { animation-delay: 0s; }
.zodiac-symbol:nth-child(2) { animation-delay: 0.1s; }
.zodiac-symbol:nth-child(3) { animation-delay: 0.2s; }
.zodiac-symbol:nth-child(4) { animation-delay: 0.3s; }
.zodiac-symbol:nth-child(5) { animation-delay: 0.4s; }
.zodiac-symbol:nth-child(6) { animation-delay: 0.5s; }
.zodiac-symbol:nth-child(7) { animation-delay: 0.6s; }
.zodiac-symbol:nth-child(8) { animation-delay: 0.7s; }
.zodiac-symbol:nth-child(9) { animation-delay: 0.8s; }
.zodiac-symbol:nth-child(10) { animation-delay: 0.9s; }
.zodiac-symbol:nth-child(11) { animation-delay: 1s; }
.zodiac-symbol:nth-child(12) { animation-delay: 1.1s; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.loading-content p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #D1D5DB;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    background: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9CA3AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .persons-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .compatibility-connector {
        transform: rotate(90deg);
    }
    
    .compatibility-score {
        flex-direction: column;
        gap: 2rem;
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .form-section,
    .astrology-form {
        padding: 1rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .chart-grid {
        width: 240px;
        height: 240px;
    }
    
    .chart-house {
        font-size: 0.7rem;
    }
    
    .planet-symbol {
        font-size: 0.8rem;
    }
}

/* Additional Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styles */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}