* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9fdf8;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    --sb-track-color: #232E33;
    --sb-thumb-color: #6BAF8D;
    --sb-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    color: #2c3e2c;
    margin-bottom: 30px;
    padding: 20px;
}

.logo {
    width: 120px;
    margin-bottom: 15px;
    border-radius: 50%;
    border: 3px solid #e8f5e9;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
}

.logo:hover {
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    border: 5px solid #81c784;
    transition: all 0.3s ease;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #2e7d32;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    color: #558b2f;
}

.upload-zone {
    background: #ffffff;
    border: 3px dashed #c8e6c9;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    color: #2c3e2c;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
}

.upload-zone:hover {
    background: #f1f8e9;
    border-color: #81c784;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.12);
}

.upload-zone.dragover {
    background: #e8f5e9;
    border-color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.15);
}

.upload-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: #4caf50;
}

.upload-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #2e7d32;
}

.upload-text p {
    opacity: 0.9;
    font-size: 1.1rem;
    color: #558b2f;
}

.progress-container {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #81c784);
    width: 0%;
    transition: width 0.5s ease;
}

.main-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 25px;
    min-height: 800px;
}

.left-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
    height: 900px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.12);
    border-color: #c8e6c9;
}

.info-box {
    height: auto;
    flex-shrink: 0;
}

.mod-list-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.card h3 {
    color: #2e7d32;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 10px;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.info-label {
    font-weight: 600;
    color: #558b2f;
    min-width: 80px;
}

.info-value {
    color: #2c3e2c;
    font-weight: 500;
}

.mod-list-container {
    flex: 1;
    overflow-y: auto;
    background: #f9fdf8;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e8f5e9;
    min-height: 0;
}

.mod-list-scroll {
    height: 100%;
    overflow-y: auto;
}

.mod-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff;
    margin-bottom: 8px;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.mod-item:hover {
    background: #f1f8e9;
    transform: translateX(3px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.1);
}

.mod-item.disabled {
    border-left-color: #e53935;
}

.mod-name {
    font-size: 0.9rem;
    color: #2c3e2c;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mod-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-enabled {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-disabled {
    background: #ffebee;
    color: #c62828;
}

.results-box {
    height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8f5e9;
    flex-shrink: 0;
}

.results-header h2 {
    color: #2e7d32;
    font-size: 1.6rem;
}

.status-badge {
    padding: 8px 16px;
    background: #e8f5e9;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-message {
    background: #f1f8e9;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    color: #558b2f;
    border-left: 4px solid #4caf50;
    flex-shrink: 0;
}

.results-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    min-height: 0;
}

.results-scroll {
    height: 100%;
    overflow-y: auto;
}

.incompatible-section {
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #2e7d32;
    font-size: 1.3rem;
}

.warning-icon {
    color: #e53935;
    font-size: 1.2rem;
}

.incompatible-card {
    background: #ffffff;
    border-left: 6px solid #e53935;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid #ffcdd2;
    transition: all 0.2s ease;
}

.incompatible-card:hover {
    box-shadow: 0 8px 16px rgba(229, 57, 53, 0.12);
    transform: translateX(3px);
}

.mod-icon-container {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e8f5e9;
}

.mod-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.default-icon {
    color: #81c784;
    font-size: 32px;
}

.mod-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mod-title {
    font-size: 1.2rem;
    color: #2c3e2c;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.issue-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #ffebee;
    color: #c62828;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.problem {
    background: #ffebee;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #e53935;
}

.problem h5 {
    color: #c62828;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem p {
    color: #424242;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.solution {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
}

.solution h5 {
    color: #2e7d32;
    margin-bottom: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.solution p {
    color: #424242;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
    margin: 0;
}

.version-badge {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0 4px;
}

.alternative-badge {
    display: inline-block;
    background: #558b2f;
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0 4px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
    flex-shrink: 0;
    align-self: stretch;
}

.modrinth-btn {
    background: #2e7d32;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.modrinth-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.action-btn {
    background: #558b2f;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #33691e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(85, 139, 47, 0.2);
}

.advice-section {
    margin-top: 30px;
}

.advice-card {
    background: #ffffff;
    border-left: 6px solid #558b2f;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(85, 139, 47, 0.08);
    border: 1px solid #e8f5e9;
}

.advice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.advice-icon {
    color: #81c784;
    font-size: 1.5rem;
}

.advice-card h3 {
    color: #558b2f;
    margin: 0;
    font-size: 1.2rem;
    border: none;
    padding: 0;
}

.advice-content {
    background: #f9fdf8;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e8f5e9;
}

.advice-content p {
    color: #424242;
    margin-bottom: 10px;
    line-height: 1.6;
}

.advice-content b {
    color: #2e7d32;
    font-weight: 700;
}

.advice-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.advice-content li {
    margin-bottom: 8px;
    color: #424242;
}

.no-issues {
    background: #e8f5e9;
    border-left: 6px solid #4caf50;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #2e7d32;
}

.no-issues-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #4caf50;
}

.no-issues h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

.placeholder {
    text-align: center;
    color: #81c784;
    padding: 60px 20px;
}

.placeholder-icon {
    font-size: 48px;
    color: #c8e6c9;
    margin-bottom: 20px;
}

.placeholder h3 {
    margin-bottom: 15px;
    color: #558b2f;
}

.placeholder p {
    color: #81c784;
    max-width: 500px;
    margin: 0 auto 15px;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    display: none;
}

.stat-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.08);
    border: 1px solid #e8f5e9;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(46, 125, 50, 0.12);
}

.stat-icon {
    font-size: 24px;
    color: #4caf50;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2e7d32;
    margin: 5px 0;
}

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

.mod-list-container::-webkit-scrollbar,
.results-container::-webkit-scrollbar {
    width: 8px;
}

.mod-list-container::-webkit-scrollbar-track,
.results-container::-webkit-scrollbar-track {
    background: #f1f8e9;
    border-radius: 4px;
}

.mod-list-container::-webkit-scrollbar-thumb,
.results-container::-webkit-scrollbar-thumb {
    background: #c8e6c9;
    border-radius: 4px;
}

.mod-list-container::-webkit-scrollbar-thumb:hover,
.results-container::-webkit-scrollbar-thumb:hover {
    background: #a5d6a7;
}

.analysis-options {
    margin-bottom: 30px;
}

.api-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f9fdf8;
    border-radius: 12px;
    border: 2px solid #e8f5e9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.radio-option:hover {
    background: #f1f8e9;
    border-color: #a5d6a7;
}

.radio-option input[type="radio"] {
    margin-top: 4px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #4caf50;
}

.radio-option label {
    flex: 1;
    cursor: pointer;
}

.radio-option strong {
    display: block;
    color: #2e7d32;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.option-description {
    color: #558b2f;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.api-key-input-container {
    margin-top: 10px;
    padding: 15px;
    background: #f1f8e9;
    border-radius: 8px;
    border: 2px solid #c8e6c9;
}

.api-key-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #c8e6c9;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
    transition: all 0.3s;
    background: #ffffff;
    color: #2c3e2c;
}

.api-key-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.api-key-input::placeholder {
    color: #81c784;
}

.api-key-note {
    margin: 0;
    font-size: 0.85rem;
    color: #558b2f;
    line-height: 1.5;
}

.api-key-note a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
}

.api-key-note a:hover {
    text-decoration: underline;
}

.version-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.version-dialog {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    border: 1px solid #e8f5e9;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.version-dialog-header {
    padding: 30px 30px 20px;
    border-bottom: 2px solid #e8f5e9;
}

.version-dialog-header h3 {
    color: #2e7d32;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    border: none;
    padding: 0;
}

.version-dialog-header p {
    color: #558b2f;
    margin: 0;
    font-size: 0.95rem;
}

.version-dialog-body {
    padding: 30px;
}

.version-input-group {
    margin-bottom: 25px;
}

.version-input-group:last-child {
    margin-bottom: 0;
}

.version-input-group label {
    display: block;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.version-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #c8e6c9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #ffffff;
    color: #2c3e2c;
}

.version-input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.version-input::placeholder {
    color: #81c784;
}

.version-dialog-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.dialog-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-btn-cancel {
    background: #f5f5f5;
    color: #757575;
    border: 2px solid #e0e0e0;
}

.dialog-btn-cancel:hover {
    background: #eeeeee;
    border-color: #bdbdbd;
}

.dialog-btn-confirm {
    background: #4caf50;
    color: white;
}

.dialog-btn-confirm:hover {
    background: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}

@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .left-col {
        height: auto;
    }
    
    .incompatible-card {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: row;
        justify-content: flex-start;
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .upload-zone {
        padding: 40px 20px;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .incompatible-card {
        padding: 15px;
    }
}

.mod-icon-container:has(img:not([src]), img[src=""])::before,
.mod-icon-container img:not([src]),
.mod-icon-container img[src=""] {
    display: none;
}


.mod-icon-container:has(img:not([src]), img[src=""]) {
    display: flex;
}

.mod-icon-container:has(img:not([src]), img[src=""])::after {
    content: "🧩";
    font-size: 32px;
    color: #a5d6a7;
}

@media (max-width: 576px) {
    .version-dialog {
        width: 95%;
        margin: 20px;
    }
    
    .version-dialog-header,
    .version-dialog-body,
    .version-dialog-footer {
        padding: 20px;
    }
    
    .version-dialog-footer {
        flex-direction: column;
    }
    
    .dialog-btn {
        width: 100%;
    }
}

body::-webkit-scrollbar {
  width: var(--sb-size);
}

body::-webkit-scrollbar-track {
  background: var(--sb-track-color);
  border-radius: 3px;
}

body::-webkit-scrollbar-thumb {
  background: var(--sb-thumb-color);
  border-radius: 3px;
}

@supports not selector(::-webkit-scrollbar) {
  body {
      scrollbar-color: var(--sb-thumb-color)
                     var(--sb-track-color);
  }
}


/* Footer Styles */
footer {
    background: #f5faf6;
    color: #2c3e2c;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 3px solid #a5d6a7;
    box-shadow: 0 -2px 10px rgba(46, 125, 50, 0.05);
}

footer .footer-container {
    max-width: 800px;
    margin: 0 auto;
}

footer p {
    margin: 10px 0;
    line-height: 1.6;
}

footer .footer-message {
    font-size: 16px;
    opacity: 0.9;
    color: #558b2f;
}

footer .footer-credit {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e2c;
}

footer .footer-link {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(46, 125, 50, 0.3);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

footer .footer-link:hover {
    border-bottom-color: #2e7d32;
    padding-bottom: 4px;
}

footer .footer-subtitle {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 15px;
    color: #558b2f;
}