/* Custom Styles for Protein Analysis Platform */

:root {
    --primary-gradient: linear-gradient(135deg, #3498db 0%, #33485b 200%);
    --success-gradient: linear-gradient(135deg, #48c6ef 0%, #32485b 100%);
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #3498db 100%); 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

/* Buttons */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn {
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Analysis Type Selection */
.analysis-type {
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.analysis-type:hover {
    background-color: #f8f9fa;
    border-left-color: #667eea;
}

.analysis-type.active {
    background-color: #e7f3ff;
    border-left-color: #0d6efd;
    font-weight: 500;
}

.analysis-type i {
    font-size: 1.2rem;
}

/* Form Controls */
.form-select:focus,
.form-control:focus,
.form-check-input:focus {
    border-color: #1e447e;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select[multiple] {
    border-radius: 0.5rem;
}

.form-select[multiple] option {
    padding: 0.5rem;
    margin: 0.25rem;
    border-radius: 0.25rem;
}

.form-select[multiple] option:checked {
    background: linear-gradient(135deg, #3498db 0%, #0dcaf0 90%);
    color: white;
}

/* Progress Bars */
.progress {
    height: 1.5rem;
    border-radius: 0.75rem;
    
}

.progress-bar {
    border-radius: 0;
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* Badges */
.badge {
    padding: 0.35rem 0.65rem;
    font-weight: 500;
    border-radius: 0.35rem;
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* File Upload */
.form-control[type="file"] {
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Example PDB Buttons */
.example-pdb {
    transition: all 0.2s;
}

.example-pdb:hover {
    transform: scale(1.05);
}

/* Structure Info Table */
.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

/* Visualization Container */
.visualization-container {
    background: #f8f9fa;
}

.visualization-iframe {
    background: white;
}

/* Tab Styling */
.nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Summary Stats */
.summary-stat {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.summary-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Loading Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .visualization-container {
        height: 500px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    .table {
        color: #e0e0e0;
    }
    
    .table-hover tbody tr:hover {
        background-color: #3d3d3d;
    }
    
    .form-control,
    .form-select {
        background-color: #3d3d3d;
        color: #e0e0e0;
        border-color: #4d4d4d;
    }
    
    .alert {
        background-color: #3d3d3d;
        border-left: 3px solid;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.alert {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
