/* Custom text selection colors */
::selection {
    background: #ea66cd;
    color: #2d3748; 
}

::-moz-selection {
    background: #ea66cd; 
    color: #2d3748; 
}

body {
    font-family: 'Space Mono', monospace;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h1, h2 {
    color: #4a5568;
    text-align: center;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2d3748;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    font-family: 'Space Mono', monospace; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.chart-section {
    margin: 30px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.main-signs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.sign-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mercury-status {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.mercury-retrograde {
    background: #fed7d7;
    color: #c53030;
    border: 2px solid #fc8181;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #667eea;
    font-weight: bold;
}

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #fc8181;
    margin: 20px 0;
}

.analysis-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0 30px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.analysis-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.analysis-section h2 {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.analysis-content {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Sparkle Animation Styles */
.sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    pointer-events: none;
    font-size: 20px;
    opacity: 0.9;
    animation: sparkle-fall linear forwards;
}

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

.sparkle.twinkle {
    animation: sparkle-fall linear forwards, twinkle 0.5s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Copy Button Styles */
.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

.copy-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

.copy-btn-float {
    float: right;
    margin-top: 10px;
    padding: 6px 10px;
    width: auto;
    min-width: auto;
}

/* Location Map Styles */
.location-selector {
    margin: 10px 0;
}

.location-search {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.location-search input {
    flex: 1;
    min-width: 200px;
    margin-right: 0;
}

.location-search button {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    min-width: auto;
}

.location-search button:hover {
    background: #5a67d8;
    transform: none;
}

#locationMap {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#locationDisplay {
    padding: 10px;
    background: #f7fafc;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    border: 1px solid #e2e8f0;
}

/* Make latitude/longitude inputs readonly-styled */
input[readonly] {
    background-color: #f7fafc;
    color: #4a5568;
    cursor: not-allowed;
}

/* Button Group Styles */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
    min-width: 180px;
}

/* Responsive design for location search */
@media (max-width: 600px) {
    .location-search {
        flex-direction: column;
    }
    
    .location-search input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .location-search button {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
}

/* Full Chart Styles */
.planets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.planet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.planet-card:hover {
    transform: translateY(-5px);
}

.planet-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.planet-card p {
    margin: 5px 0;
    font-size: 16px;
}

.planet-card small {
    display: block;
    margin: 5px 0;
    opacity: 0.8;
}

.planet-description {
    margin: 10px 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.house-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px !important;
}

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

.house-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.house-card:hover {
    transform: translateY(-5px);
}

.house-card h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.house-title {
    margin: 10px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.house-description {
    margin: 10px 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.house-planets {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.planet-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    backdrop-filter: blur(10px);
}

.navigation-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .planets-grid,
    .houses-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-links {
        flex-direction: column;
        align-items: center;
    }
}
