/* Science Models Idea Generator - Advanced CSS */
:root {
    --primary: #3498db;
    --secondary: #2ecc71;
    --accent: #e74c3c;
    --warning: #f39c12;
    --info: #9b59b6;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --darker: #1a252f;
    --success: #27ae60;
    --danger: #e74c3c;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3498db, #9b59b6);
    --gradient-secondary: linear-gradient(135deg, #2ecc71, #3498db);
    --gradient-accent: linear-gradient(135deg, #e74c3c, #f39c12);
    --gradient-dark: linear-gradient(135deg, #2c3e50, #34495e);
    
    /* Shadows */
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 15px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 15px 25px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 20px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

[data-theme="dark"] {
    --light: #2c3e50;
    --dark: #ecf0f1;
    --darker: #bdc3c7;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 15px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 15px 25px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--gradient-primary);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition-medium);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.science-header {
    background: var(--gradient-dark);
    color: white;
    padding: 30px;
    border-radius: var(--radius-large);
    margin-bottom: 30px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
}

.science-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.science-title {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 20px rgba(52, 152, 219, 0.5); }
    100% { text-shadow: 0 0 30px rgba(52, 152, 219, 0.8), 0 0 40px rgba(52, 152, 219, 0.6); }
}

.science-tagline {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-medium);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-card, .stats-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-large);
    padding: 30px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-fast);
}

[data-theme="dark"] .panel-card,
[data-theme="dark"] .stats-card {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-card:hover, .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.panel-card h3, .stats-card h4 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.science-select {
    width: 100%;
    padding: 15px;
    border-radius: var(--radius-medium);
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: white;
    color: var(--darker);
}

[data-theme="dark"] .science-select {
    background: var(--light);
    border-color: #4a5f7a;
    color: var(--dark);
}

.science-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: scale(1.02);
}

/* Button Styles */
.generate-btn {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-medium);
    border: none;
    background: var(--gradient-secondary);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition-medium);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius-medium);
    transition: var(--transition-fast);
}

[data-theme="dark"] .stat-item {
    background: rgba(255, 255, 255, 0.1);
}

.stat-item:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Result Panel */
.result-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-large);
    padding: 30px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .result-panel {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.result-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-medium);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-btn {
    background: var(--accent);
    color: white;
}

.word-btn {
    background: var(--success);
    color: white;
}

.share-btn {
    background: var(--info);
    color: white;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.science-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(52, 152, 219, 0.3);
    border-left: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Model Result */
.model-result {
    min-height: 400px;
    transition: var(--transition-medium);
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-message h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.welcome-message p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.feature {
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius-medium);
    font-weight: 600;
    transition: var(--transition-fast);
}

[data-theme="dark"] .feature {
    background: rgba(255, 255, 255, 0.1);
}

.feature:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Result Sections */
.result-section {
    background: var(--light);
    margin-bottom: 20px;
    padding: 25px;
    border-radius: var(--radius-medium);
    border-left: 5px solid var(--primary);
    transition: var(--transition-fast);
    animation: slideIn 0.5s ease-out;
}

[data-theme="dark"] .result-section {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-section:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-light);
}

.result-section h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-section p {
    line-height: 1.8;
    color: var(--dark);
}

.result-section ul {
    padding-left: 20px;
}

.result-section li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 10px;
}

.result-section li::before {
    content: '🔬';
    position: absolute;
    left: -20px;
}

/* Footer */
.science-footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    color: white;
    background: var(--gradient-dark);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-medium);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 25px;
    border-radius: var(--radius-medium);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.info {
    background: var(--info);
}

/* Floating Animation */
.floating-animation {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="%233498db" opacity="0.1"/></svg>');
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .science-title {
        font-size: 2rem;
    }
    
    .science-tagline {
        font-size: 1.1rem;
    }
    
    .panel-card, .stats-card, .result-panel {
        padding: 20px;
    }
    
    .export-buttons {
        justify-content: center;
    }
    
    .feature-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .science-title {
        font-size: 1.6rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .theme-btn {
        width: 100%;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .theme-toggle,
    .export-buttons,
    .science-footer {
        display: none;
    }
    
    .science-header {
        background: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
    }
}