.rgb-hex-section {
    min-height: 100vh;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rgb-hex-section .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculator-title i {
    font-size: 32px;
}

.calculator-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-item {
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
}

.converter-main {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.color-preview {
    height: 150px;
    border-radius: 15px;
    margin-bottom: 25px;
    background: #ff0000;
    transition: background 0.3s ease;
}

.convert-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tab-content {
    display: none;
}

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

.input-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.input-section label {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.input-section:nth-child(1) label {
    background: #ff0000;
}

.input-section:nth-child(2) label {
    background: #00ff00;
}

.input-section:nth-child(3) label {
    background: #0000ff;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.range-value {
    width: 45px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#hex-to-rgb-content .input-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

#hex-to-rgb-content label {
    background: none;
    color: #333;
    font-weight: 600;
    width: auto;
    height: auto;
    border-radius: 0;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0 15px;
    width: 100%;
}

.input-wrapper:focus-within {
    border-color: #667eea;
}

.hash {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
}

.form-control {
    flex: 1;
    padding: 12px 0;
    border: none;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    outline: none;
}

.hex-formats {
    display: flex;
    gap: 10px;
}

.format-btn {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.result-section {
    margin-top: 25px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.result-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
}

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

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

.result-label {
    color: #666;
    font-size: 14px;
}

.result-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.copy-btn {
    padding: 5px 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #5a6fd6;
}

.preset-colors {
    margin-top: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #667eea;
}

.colors-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.color-item {
    aspect-ratio: 1;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-item:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

@media (max-width: 480px) {
    .converter-main {
        padding: 20px;
    }

    .colors-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}