/**
 * Public CSS for Color Genius
 * 
 * All of the public-facing styles
 *
 * @link       https://example.com/color-genius
 * @since      1.0.0
 */

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.app-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .app-wrapper {
        grid-template-columns: 1fr;
    }
}

.color-picker {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.color-display {
    position: relative;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(0,0,0,1) 100%), 
                linear-gradient(to right, rgba(255,0,0,1) 0%, rgba(255,255,0,1) 17%, rgba(0,255,0,1) 33%, 
                rgba(0,255,255,1) 50%, rgba(0,0,255,1) 67%, rgba(255,0,255,1) 83%, rgba(255,0,0,1) 100%);
    cursor: crosshair;
}

.color-selector {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hue-slider {
    width: 100%;
    margin: 15px 0;
}

.current-color {
    height: 60px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

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

.color-input input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.color-input button {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

.color-input button:hover {
    background-color: #2980b9;
}

.color-values {
    margin-bottom: 20px;
}

.color-value {
    background-color: #f1f2f6;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 14px;
}

.tab-navigation {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 15px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

.tab-button.active {
    border-bottom-color: #3498db;
    color: #3498db;
}

.tab-content {
    display: none;
}

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

.harmony-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.harmony-button {
    padding: 8px 15px;
    background-color: #f1f2f6;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.harmony-button:hover {
    background-color: #dfe4ea;
}

.harmony-button.active {
    background-color: #3498db;
    color: white;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.color-swatch {
    flex: 1;
    min-width: 100px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.swatch-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 10px;
    transition: transform 0.3s;
    transform: translateY(100%);
}

.color-swatch:hover .swatch-info {
    transform: translateY(0);
}

.swatch-hex {
    font-weight: bold;
    margin-bottom: 5px;
}

.swatch-values {
    font-size: 12px;
    opacity: 0.9;
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.color-swatch:hover .copy-button {
    opacity: 1;
}

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

.export-button {
    padding: 10px 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

.export-button:hover {
    background-color: #27ae60;
}

.format-radios {
    margin: 15px 0;
}

.format-radios label {
    margin-right: 15px;
    cursor: pointer;
}

/* HSV Box Styles */
.hsv-box {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 10px;
}

.saturation-value-box {
    position: relative;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%), 
                linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,0,0,1) 100%);
    border-radius: 8px;
    cursor: crosshair;
}

.hue-bar {
    height: 20px;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, 
                #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    border-radius: 4px;
    cursor: pointer;
}

.sv-cursor, .hue-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* RGB Sliders */
.rgb-sliders {
    display: grid;
    gap: 15px;
}

.slider-group {
    display: flex;
    flex-direction: column;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.color-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    outline: none;
}

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.red-slider {
    background: linear-gradient(to right, #000 0%, #f00 100%);
}

.green-slider {
    background: linear-gradient(to right, #000 0%, #0f0 100%);
}

.blue-slider {
    background: linear-gradient(to right, #000 0%, #00f 100%);
}