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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
}

.logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.lang-switcher {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: white;
    color: #667eea;
}

.main-content {
    padding: 40px;
}

.color-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.color-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.color-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

input[type="color"] {
    width: 60px;
    height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.preset-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-color {
    width: 32px;
    height: 32px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-color:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.swap-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swap-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.swap-button:hover {
    transform: rotate(180deg);
    background: #764ba2;
}

.preview-section {
    margin-bottom: 40px;
}

.preview-card {
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.preview-card h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.preview-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.preview-small {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

.results-section {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.contrast-ratio {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.contrast-ratio span {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.ratio-value {
    font-size: 36px;
    font-weight: bold;
}

.wcag-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wcag-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.wcag-card h3 {
    margin-bottom: 15px;
    color: #333;
}

.wcag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wcag-item:last-child {
    border-bottom: none;
}

.status {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.status.pass {
    background: #d4edda;
    color: #155724;
}

.status.fail {
    background: #f8d7da;
    color: #721c24;
}

.simulation-section {
    margin-bottom: 40px;
}

.simulation-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.simulation-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sim-tab {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.sim-tab:hover {
    background: #f8f9fa;
}

.sim-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.simulation-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: center;
}

.sim-colors {
    display: flex;
    gap: 20px;
}

.sim-color {
    flex: 1;
}

.sim-color span {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #666;
}

.color-box {
    height: 60px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.sim-contrast {
    text-align: center;
}

.sim-contrast span {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.sim-ratio {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.info-card h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.info-card li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    .color-inputs {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .swap-button-container {
        order: -1;
    }
    
    .results-section {
        grid-template-columns: 1fr;
    }
    
    .wcag-results {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .simulation-preview {
        grid-template-columns: 1fr;
    }
}