/* Hydrocarbons Page Styling */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #ecf0f1;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-description {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.keyword-badge {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.keyword-icon {
    width: 16px;
    height: 16px;
    fill: white;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

.section-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.visualization-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.molecule-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atom {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.atom:hover {
    transform: scale(1.2);
}

.bond {
    position: absolute;
    background-color: #6c757d;
    transform-origin: left center;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.control-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.calculator-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin: 2rem 0;
}

.calculator-form {
    display: grid;
    gap: 1rem;
}

.result-display {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-color);
}

.difference-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin: 2rem 0;
}

.difference-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .difference-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.difference-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
}

.difference-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.export-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.export-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.export-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.simulation-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.simulation-button {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.simulation-button:hover {
    background-color: #219a52;
    transform: translateY(-2px);
}

.process-step {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
}

.step-number {
    background-color: var(--warning-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step-description {
    font-size: 0.9rem;
    color: #6c757d;
}

.interactive-element {
    background-color: #e8f4fd;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.responsive-iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: var(--border-radius);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .visualization-container {
        height: 250px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .export-section {
        flex-direction: column;
    }
    
    .simulation-controls {
        flex-direction: column;
    }
    
    .simulation-button {
        width: 100%;
    }
}

/* Accessibility */
.screen-reader-only {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.high-contrast {
    background-color: white;
    color: black;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}

/* Navigation */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Footer */
.page-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
    :root {
        --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .section-card {
        border: 2px solid var(--primary-color);
    }
    
    .keyword-badge {
        border: 2px solid var(--primary-color);
    }
}