/* Core Layout Styles */
.section-heading {
    margin-bottom: 15px;
    text-align: center;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.analyzer-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

/* Upload Box Styles */
.upload-box {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.upload-intro {
    text-align: center;
    margin-bottom: 25px;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #4CAF50;
    margin: 0 auto 15px auto;
    display: block;
}

.simple-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.file-input-container {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.file-input {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 45px;
    border-radius: 25px;
    background: #f1f1f1;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding: 0 15px;
}

.file-input-label:hover {
    background: #e1e1e1;
}

.file-input:focus + .file-input-label {
    outline: 2px solid #3498db;
}

.analyze-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.analyze-button:hover {
    background-color: #45a049;
}

/* Loading State */
.analyzer-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.simple-form.loading .analyzer-loading {
    display: block;
}

.simple-form.loading .analyze-button {
    display: none;
}

/* Results Box */
.results-box {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Results Container */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.result-section {
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.result-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Icon Preview */
.icon-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.preview-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.icon-name-box {
    width: 100%;
    text-align: center;
}

.icon-name {
    font-size: 20px;
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.icon-preview-box {
    position: relative;
    width: 100%;
    padding: 30px 25px;
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
    font-weight: 500;
}

/* Real Icon Preview */
.icon-full-size {
    max-width: 256px;
    max-height: 256px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background-color: #f8f8f8;
    background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
                     linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
                     linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
                     linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    padding: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.icon-full-size img {
    display: block;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated; /* Better rendering for pixel art icons */
}

.icon-dimensions-info {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.dimension-value {
    font-weight: bold;
    color: #333;
}

.format-info {
    color: #666;
    margin-left: 5px;
}

/* Fallback Visualization */
.icon-representation {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.transparency-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                     linear-gradient(-45deg, #ccc 25%, transparent 25%),
                     linear-gradient(45deg, transparent 75%, #ccc 75%),
                     linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.3;
}

.icon-shape {
    width: 60%;
    height: 60%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    text-align: center;
}

.icon-info {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* Quality-based coloring */
.preview-high {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.preview-medium {
    background: linear-gradient(135deg, #FFC107, #FF9800);
}

.preview-low {
    background: linear-gradient(135deg, #F44336, #FF5722);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.preview-actions {
    margin-top: 15px;
}

.action-button, .download-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    text-decoration: none;
}

.action-button:hover, .download-button:hover {
    background-color: #2980b9;
}

.download-button::before {
    content: "↓";
    margin-right: 5px;
    font-weight: bold;
}

/* Summary Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quality-score-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 15px;
}

.quality-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    color: white;
    padding: 10px;
}

.score-high {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.score-medium {
    background: linear-gradient(135deg, #FFC107, #FF9800);
}

.score-low {
    background: linear-gradient(135deg, #F44336, #FF5722);
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

.summary-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    flex: 1;
}

.summary-item {
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 4px;
}

.summary-item span {
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-spacing: 0;
    border-collapse: separate;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.results-table th {
    background-color: #2c3e50;
    color: white;
    text-align: left;
    padding: 14px 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #edf2f7;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.results-table tr:hover {
    background-color: #f1f5f9;
}

/* Size Visualization */
.size-visualization {
    margin-top: 20px;
}

.size-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.size-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px;
}

.size-present {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.size-missing {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
}

.size-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.size-check {
    color: #4CAF50;
    font-size: 24px;
}

.size-x {
    color: #F44336;
    font-size: 24px;
}

/* Compatibility Section */
.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.compat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.compat-present {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.compat-missing {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    opacity: 0.7;
}

.compat-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.compat-present .compat-icon {
    color: #4CAF50;
}

.compat-missing .compat-icon {
    color: #9e9e9e;
}

/* Recommendations Section */
.result-section ul {
    padding-left: 0;
    list-style-type: none;
}

.result-section ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.result-section ul li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: #f1c40f;
    border-radius: 3px;
}

.result-section ul li:nth-child(1):before {
    background-color: #2ecc71;
}

.result-section ul li:nth-child(2):before {
    background-color: #3498db;
}

.result-section ul li:nth-child(3):before {
    background-color: #f1c40f;
}

.result-section ul li:nth-child(4):before {
    background-color: #e74c3c;
}

.result-section ul li:nth-child(5):before {
    background-color: #9b59b6;
}

/* Info Box Styling */
.info-container-full ul {
    padding-left: 0;
    list-style-type: none;
}

.info-container-full ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.info-container-full ul li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: #f1c40f;
    border-radius: 3px;
}

/* Key Points Section */
.key-points-section {
    padding: 25px;
    margin-top: 20px;
}

.key-points-section h4 {
    color: #2c3e50;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    position: relative;
}

.key-points-section h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    height: 70%;
    border-radius: 2px;
}

.key-points-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.key-point-item {
    background-color: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

.key-point-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.key-point-icon {
    flex-shrink: 0;
    margin-right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f5fd;
    border-radius: 6px;
    color: #2eb5cc;
}

.key-point-text {
    font-size: 15px;
    line-height: 1.5;
    color: #2c3e50;
}

/* Other Analyzers Section */
.other-analyzers-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.other-analyzers-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.other-analyzers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.analyzer-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analyzer-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.analyzer-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f7fb;
    color: #2eb5cc;
}

.analyzer-content {
    padding: 20px;
}

.analyzer-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 18px;
}

.analyzer-content p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #5d6778;
    font-size: 14px;
    line-height: 1.5;
}

.analyzer-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: #2eb5cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.analyzer-link:hover {
    background-color: #28a0b5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .summary-details {
        grid-template-columns: 1fr;
    }
    
    .quality-score-container {
        flex-direction: column;
        align-items: center;
    }
    
    .key-points-list,
    .other-analyzers-grid {
        grid-template-columns: 1fr;
    }
}