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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: left;
    margin-bottom: 20px;
    color: #333;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1a1a1a;
}

.subtitle {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.product-link {
    margin-top: 15px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

.printify-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.printify-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.link-note {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Instructions Panel */
.instructions-panel {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.instructions-header {
    padding: 12px 15px;
    background: #e9ecef;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.instructions-header:hover {
    background: #dee2e6;
}

.instructions-title {
    font-weight: 500;
    color: #495057;
}

.instructions-toggle {
    color: #6c757d;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.instructions-toggle.rotated {
    transform: rotate(180deg);
}

.instructions-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.instructions-content.open {
    max-height: 1200px;
    padding: 15px;
}

.instructions-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.refresh-btn:active {
    transform: translateY(0);
}

.icon {
    font-size: 1.2rem;
}

.status {
    font-weight: 500;
    color: #666;
}

.status.loading {
    color: #667eea;
}

.status.success {
    color: #28a745;
}

.status.error {
    color: #dc3545;
}

.content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 200px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

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

.grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-group {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #dc3545;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

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

.sizes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.size-item {
    display: inline-block;
}

/* 2XL Sektion Styles */
.xxl-section {
    background: #fff3cd;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #ffc107;
    margin-top: 30px;
}

.xxl-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ffeaa7;
}

.xxl-header h3 {
    color: #856404;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.xxl-note {
    color: #856404;
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.8;
}

.xxl-colors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.xxl-color-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ffeaa7;
    transition: transform 0.2s;
}

.xxl-color-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-name-small {
    font-size: 0.9rem;
    color: #856404;
    font-weight: 500;
}

/* Raw Array Sektion Styles */
.raw-array-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #6c757d;
    margin-top: 30px;
}

.raw-array-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.raw-array-header h3 {
    color: #495057;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.raw-array-note {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

.raw-array-container {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.raw-array-content {
    background: #f8f9fa;
    margin: 0;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #495057;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.4;
    border: none;
    max-height: 300px;
    overflow-y: auto;
}

/* Abweichungs-Hinweis */
.discrepancy-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

.discrepancy-notice p {
    color: #721c24;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.color-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.size-count {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.size-badge {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.size-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #28a745;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .color-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sizes-container {
        justify-content: flex-start;
    }
}
