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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 20px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

.controls-card, .info-card, .choghadiya-section, .info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease;
}

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

/* Current Choghadiya Card */
.current-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    border: 3px solid rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.8s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.current-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.current-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.current-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.current-content {
    position: relative;
    z-index: 1;
}

.current-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-time {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
}

.current-desc {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 25px;
    line-height: 1.6;
}

.current-progress {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.current-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.current-actions .btn-action {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
}

.next-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    font-size: 0.95rem;
    color: #1e40af;
    position: relative;
    z-index: 1;
}

.next-info strong {
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field.small {
    width: calc(50% - 5px);
    display: inline-block;
    margin-right: 10px;
}

.input-field.small:last-child {
    margin-right: 0;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-container .input-field {
    flex: 1;
}

.btn-search {
    padding: 14px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-search:hover {
    background: #059669;
    transform: translateY(-1px);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 12px;
    margin-top: 10px;
}

.search-result-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.search-result-item.selected {
    background: #e0e7ff;
    border-color: #667eea;
    font-weight: 600;
}

.selected-location-info {
    padding: 15px;
    background: #e0e7ff;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.selected-location-info strong {
    color: #667eea;
}

.coords-inputs {
    display: flex;
    gap: 10px;
}

.btn-primary {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.sun-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.sun-time {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
}

.sun-time .icon {
    font-size: 2.5rem;
}

.sun-time .label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.sun-time .time {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.choghadiya-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.legend-item {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.legend-item.amrit { background: #10b981; }
.legend-item.shubh { background: #3b82f6; }
.legend-item.labh { background: #8b5cf6; }
.legend-item.char { background: #f59e0b; }
.legend-item.udveg { background: #ef4444; }
.legend-item.kaal { background: #dc2626; }
.legend-item.rog { background: #991b1b; }

.choghadiya-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.choghadiya-item {
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}

.choghadiya-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.choghadiya-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-action {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-calendar {
    background: #4285f4;
    color: white;
}

.btn-calendar:hover {
    background: #2a75f3;
    transform: translateY(-2px);
}

.btn-insights {
    background: #8b5cf6;
    color: white;
}

.btn-insights:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

.choghadiya-item.amrit { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
}

.choghadiya-item.shubh { 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.choghadiya-item.labh { 
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #8b5cf6;
}

.choghadiya-item.char { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.choghadiya-item.udveg { 
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.choghadiya-item.kaal { 
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #dc2626;
}

.choghadiya-item.active {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border-width: 3px;
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
    }
}

.choghadiya-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.choghadiya-time {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
}

.choghadiya-desc {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.info-content {
    color: #555;
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 15px;
}

.info-content ul {
    list-style: none;
    padding-left: 0;
}

.info-content li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-content li:last-child {
    border-bottom: none;
}

.info-content strong {
    color: #667eea;
}

/* Contact Form Section */
.contact-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.contact-header {
    text-align: center;
    margin-bottom: 35px;
}

.contact-header h2 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-header p {
    font-size: 1.1rem;
    color: #666;
}

.contact-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
}

.feature-item strong {
    display: block;
    color: #667eea;
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.contact-form {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.contact-form textarea.input-field {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.captcha-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.btn-submit {
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-text, .btn-loader {
    position: relative;
    z-index: 1;
}

.spinner-small {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
}

.form-message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
}

.contact-info {
    margin-top: 25px;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    margin-top: 15px;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

.modal-close {
    color: #999;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: #333;
}

#modal-title {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-body {
    line-height: 1.8;
    color: #555;
}

.insights-loading {
    text-align: center;
    padding: 40px 20px;
}

.insight-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.insight-section h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.insight-section ul {
    list-style: none;
    padding-left: 0;
}

.insight-section li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.insight-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.insight-avoid li:before {
    content: "✗";
    color: #ef4444;
}

footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    font-size: 0.95rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .sun-times {
        grid-template-columns: 1fr;
    }
    
    .choghadiya-grid {
        grid-template-columns: 1fr;
    }
    
    .legend {
        justify-content: center;
    }
    
    .controls-card, .info-card, .choghadiya-section, .info-section {
        padding: 20px;
    }
    
    .current-card {
        padding: 25px;
    }
    
    .current-name {
        font-size: 2rem;
    }
    
    .current-time {
        font-size: 1.2rem;
    }
    
    .current-title {
        font-size: 1.5rem;
    }
    
    .current-actions {
        flex-direction: column;
    }
    
    .contact-section {
        padding: 25px;
    }
    
    .contact-header h2 {
        font-size: 1.8rem;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .input-field.small {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .coords-inputs {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .choghadiya-actions {
        flex-direction: column;
    }
    
    .current-card {
        padding: 20px;
    }
    
    .current-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
    
    .current-name {
        font-size: 1.6rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

