:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #2ecc71;
    --light: #ecf0f1;
    --dark: #34495e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
}

button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--secondary);
}

.btn-danger {
    background: var(--accent);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #27ae60;
}

.simulation-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.chemical-structure {
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}

.chart-container {
    height: 300px;
    margin-top: 20px;
}

.mechanism-diagram {
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}

.reaction-list {
    max-height: 400px;
    overflow-y: auto;
}

.reaction-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.reaction-item:hover {
    background-color: #f8f9fa;
}

.reaction-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.reaction-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.reaction-desc {
    font-size: 0.9rem;
    color: #666;
}

.reaction-actions {
    display: flex;
    gap: 5px;
}

.results-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    max-height: 200px;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.resources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.resource-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.resource-item:hover {
    transform: translateY(-2px);
}

.resource-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary);
}

.resource-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.resource-link:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .simulation-controls {
        flex-direction: column;
    }
    /* Dashboard Styles */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.dashboard-welcome h2 {
    margin-bottom: 10px;
}

.role-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
}

.stat-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.simulation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.simulation-item:last-child {
    border-bottom: none;
}

.simulation-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.simulation-status.completed {
    background: #d4edda;
    color: #155724;
}

.simulation-status.running {
    background: #fff3cd;
    color: #856404;
}

.simulation-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.public-badge, .private-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
}

.public-badge {
    background: #d4edda;
    color: #155724;
}

.private-badge {
    background: #f8d7da;
    color: #721c24;
}

.reaction-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .account-actions {
        flex-direction: column;
    }
}
/* Add these to your existing style.css */

/* Checkbox labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Form rows for multiple columns */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Small text for form hints */
small {
    color: #666;
    font-size: 0.8rem;
    display: block;
    margin-top: 5px;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Admin specific styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.admin-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.admin-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.admin-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.admin-tab:hover {
    color: var(--secondary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

/* Responsive tables */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px 4px;
    }
}

/* Password strength meter */
.password-strength {
    height: 5px;
    background: #eee;
    border-radius: 3px;
    margin-top: 5px;
    transition: all 0.3s;
}

.strength-weak { background: #e74c3c; }
.strength-medium { background: #f39c12; }
.strength-strong { background: #2ecc71; }
.strength-very-strong { background: #27ae60; }

/* Demo accounts */
.demo-accounts {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.demo-account {
    margin: 5px 0;
    cursor: pointer;
    padding: 8px;
    border-radius: 3px;
    transition: background 0.3s;
}

.demo-account:hover {
    background: #e9ecef;
}
}