/* Global style reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header styles */
.header {
    background: #28a745;
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    width: 250px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #008c45;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 20px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 250px;
    height: calc(100vh - 60px);
    background: #0b1927;
    color: white;
    transition: transform 0.3s ease;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    transform: translateX(-250px);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #3498db;
}

.nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border-left-color: #3498db;
}

.nav-icon {
    width: 20px;
    margin-right: 15px;
    font-size: 16px;
}

.nav-text {
    font-weight: 500;
}

/* Main content area styles */
.main-content {
    margin-left: 250px;
    margin-top: 60px;
    padding: 30px;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Page content styles */
.page-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.content-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    margin-right: 15px;
    border-radius: 2px;
}

.content-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.citation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.citation p {
    margin: 0;
    font-style: italic;
}

/* ATTB-Find specific styles */
.upload-area {
    text-align: center;
    padding: 40px;
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.file-input {
    display: none;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-wrapper i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    pointer-events: none;
    /* Avoid blocking clicks */
}

.file-input {
    padding-left: 28px;
    /* Leave space for the icon on the left */
}

.upload-label {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.upload-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.upload-label i {
    margin-right: 10px;
    font-size: 18px;
}

/* File info display styles */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

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

.file-details i {
    color: #27ae60;
    font-size: 18px;
}

.file-details span {
    font-weight: 500;
    color: #2c3e50;
}

.file-details small {
    color: #7f8c8d;
    font-size: 12px;
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RiPPs specific styles */
.analysis-tools {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.tool-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.tool-btn:last-child {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.tool-btn:last-child:hover {
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

/* Other Tools specific styles */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.tool-card i {
    font-size: 40px;
    color: #3498db;
    margin-bottom: 15px;
}

.tool-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.tool-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .page-title {
        font-size: 24px;
    }

    .content-section {
        padding: 20px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .analysis-tools {
        flex-direction: column;
    }
}

/* Sidebar collapsed styles */
.sidebar.collapsed+.main-content {
    margin-left: 0;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* AttB-find specific styles */
.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.results-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.results-summary {
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.stat-card i {
    font-size: 40px;
    opacity: 0.8;
}

.stat-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    opacity: 0.9;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
}

.results-table {
    margin-bottom: 30px;
}

.results-table h4 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.download-links h4 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.file-input {
    display: none;
}

.upload-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: #6c757d;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-label:hover {
    background-color: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .download-buttons {
        flex-direction: column;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* File upload area styles */
.file-upload-area {
    position: relative;
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover {
    border-color: #2980b9;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.file-upload-area.dragover {
    border-color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.file-upload-area:hover .upload-icon {
    color: #2980b9;
    transform: scale(1.1);
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.upload-subtitle {
    font-size: 14px;
    color: #7f8c8d;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    max-width: 100%;
}

.file-info i {
    font-size: 20px;
    color: #27ae60;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-file {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}



/* Drag and drop styles */
.file-upload-area.dragover .upload-icon {
    color: #27ae60;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Result image styles */
.result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.result-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.result-item img {
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}