/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Custom Properties */
:root {
    --primary-color: #0066cc;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 25px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 40px rgba(0,0,0,0.2);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,800 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.dashboard-preview {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(-10deg) rotateX(0deg);
}

.stat-card {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

/* Prediction Demo */
.prediction-demo {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Card Styles */
.card {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,102,204,0.25);
    transform: translateY(-2px);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid #e9ecef;
    border-right: none;
    background: var(--secondary-color);
}

/* Button Styles */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4a8a 100%);
}

.btn-outline-secondary {
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
}

.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: white;
    transform: translateY(-2px);
}

/* Results Section */
#results {
    animation: fadeInUp 0.5s ease;
}

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

.risk-score-display {
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
}

.risk-low {
    background: var(--gradient-success);
    color: white;
}

.risk-medium {
    background: var(--gradient-warning);
    color: white;
}

.risk-high {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.risk-score-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.risk-score-label {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Metric Cards */
.metric-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-light);
}

/* Analytics Section */
#analytics {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 280px;
    margin: 1rem 0;
    padding: 0.5rem;
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* About Section */
.about-stats .stat-item {
    padding: 1.5rem;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.about-stats .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .dashboard-preview {
        transform: none;
        margin-top: 2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .risk-score-number {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .stat-card, .metric-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 0.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 220px;
        margin: 0.5rem 0;
        padding: 0.25rem;
    }
    
    #analytics .col-lg-6 {
        margin-bottom: 2rem;
    }
}

/* Custom Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-warning {
    background: var(--gradient-warning);
}

/* Progress Bar Enhancements */
.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Tooltip Enhancements */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    border-radius: 8px;
    padding: 8px 12px;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}
