/* AI-Powered Exoplanet Discovery - Custom Styles */

:root {
    --primary-color: #0066cc;
    --secondary-color: #ff6b35;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #1a1a1a;
    --space-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.hero-section {
    background: var(--space-gradient);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    opacity: 0.3;
    animation: twinkle 20s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* Hero Animation */
.hero-animation {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-center {
    position: absolute;
    font-size: 3rem;
    color: #ffd700;
    animation: pulse 3s ease-in-out infinite;
}

.orbit-1, .orbit-2, .orbit-3 {
    position: absolute;
    color: var(--secondary-color);
    font-size: 1.5rem;
    animation-duration: 10s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.orbit-1 {
    animation-name: orbit1;
    transform-origin: 80px 0;
}

.orbit-2 {
    animation-name: orbit2;
    animation-duration: 15s;
    transform-origin: 120px 0;
    color: #17a2b8;
}

.orbit-3 {
    animation-name: orbit3;
    animation-duration: 20s;
    transform-origin: 160px 0;
    color: #28a745;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(80px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}

@keyframes orbit2 {
    from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes orbit3 {
    from { transform: rotate(0deg) translateX(160px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(160px) rotate(-360deg); }
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--secondary-color);
}

/* Statistics Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0;
}

/* Analysis Cards */
.prediction-card, .transit-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 1rem;
}

.prediction-result {
    margin: 1rem 0;
}

.prediction-result .badge {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.probability {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.confidence {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0052a3);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0052a3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

/* Badge Styles */
.badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.badge.bg-success {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
}

.badge.bg-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c) !important;
}

.badge.bg-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14) !important;
    color: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-animation {
        height: 250px;
        margin-top: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .orbit-1 { transform-origin: 60px 0; }
    .orbit-2 { transform-origin: 90px 0; }
    .orbit-3 { transform-origin: 120px 0; }
    
    @keyframes orbit1 {
        from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
    }
    
    @keyframes orbit2 {
        from { transform: rotate(0deg) translateX(90px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(90px) rotate(-360deg); }
    }
    
    @keyframes orbit3 {
        from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
        to { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
    }
}

/* Plot Containers */
#lightcurve-plot, #period-plot {
    border-radius: 10px;
    background: #f8f9fa;
}

/* Footer */
footer {
    background: var(--space-gradient) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success/Error States */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}
