/* style.css - Modern Astrology Calculator Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

input, select, button, textarea {
    font-size: 16px;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 40px;
}

h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.birth-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.half {
    flex: 1;
    min-width: 120px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.hint {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85em;
}

h3 {
    color: #444;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-calculate, .btn-reset, .btn-back, .btn-print {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 2;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-reset {
    background: #f0f0f0;
    color: #666;
    flex: 1;
}

.btn-reset:hover {
    background: #e0e0e0;
}

.note {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    color: #555;
}

/* Results Page Styles */
.results-container {
    max-width: 1000px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.result-card h2 {
    color: #444;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.result-table tr:last-child {
    border-bottom: none;
}

.result-table th {
    text-align: left;
    padding: 12px 15px;
    color: #555;
    font-weight: 600;
    width: 40%;
}

.result-table td {
    padding: 12px 15px;
    color: #333;
}

.highlight {
    background: linear-gradient(135deg, #f5f7ff 0%, #f0f3ff 100%);
    border: 2px solid #667eea;
}

.moon-position {
    text-align: center;
}

.position-main {
    margin-bottom: 30px;
}

.big-number {
    font-size: 4em;
    font-weight: 700;
    color: #333;
    display: block;
}

.position-detail, .nakshatra-detail {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.zodiac-result, .nakshatra-result {
    font-size: 1.5em;
    color: #667eea;
    margin-top: 10px;
}

.technical-details {
    margin-top: 30px;
    padding: 20px;
    background: #2d2d2d;
    color: #f0f0f0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.technical-details h3 {
    color: #fff;
    border-bottom-color: #555;
}

.technical-details pre {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    color: #0f0;
    margin: 15px 0;
}

.error-card {
    background: #fff3f3;
    border: 2px solid #ff6b6b;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
}

.error-card h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error-card ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 30px;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-back {
    background: #667eea;
    color: white;
    flex: 1;
}

.btn-print {
    background: #28a745;
    color: white;
    flex: 1;
}

.btn-back:hover, .btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.info-text {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .half {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .big-number {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .result-table th, .result-table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
}

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.city-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.city-input-wrapper input {
    width: 100%;
    padding-right: 30px;
}

.loader {
    position: absolute;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.suggestions-list li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover,
.suggestions-list li.selected {
    background: #667eea;
    color: white;
}

.suggestions-list li small {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.suggestions-list li:hover small,
.suggestions-list li.selected small {
    color: #e0e0e0;
}

.no-results {
    padding: 10px;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* Mobile styles for suggestions */
@media (max-width: 768px) {
    .suggestions-list li {
        padding: 12px;
        font-size: 16px;
    }
    
    .suggestions-list li small {
        font-size: 12px;
    }
}