/* Color Palette Generator Styles */
.color-wrapper {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.color-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

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

.color-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 8px;
}

.color-header .subtitle {
    color: #666;
    font-size: 16px;
}

/* Controls */
.color-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.control-group select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.control-group select:focus {
    border-color: #ff7a18;
    outline: none;
}

.control-group input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
}

.btn-generate-palette {
    padding: 10px 20px;
    background: #ff7a18;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-generate-palette:hover {
    background: #e06a0e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 24, 0.3);
}

.btn-random {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-random:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Palette Grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.color-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.color-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.color-preview {
    height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    position: relative;
}

.color-info {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    text-align: center;
}

.color-info .hex {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    display: block;
}

.color-info .rgb {
    font-family: monospace;
    font-size: 12px;
    opacity: 0.8;
}

.color-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    justify-content: center;
}

.color-actions button {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    background: rgba(255,255,255,0.9);
}

.color-actions button:hover {
    transform: scale(1.05);
}

.color-card .copy-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s;
}

.color-card:hover .copy-badge {
    opacity: 1;
}

/* Palette Actions */
.palette-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.palette-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-copy-all {
    background: #28a745;
    color: white;
}

.btn-copy-all:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-export-css {
    background: #007bff;
    color: white;
}

.btn-export-css:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-export-tailwind {
    background: #06b6d4;
    color: white;
}

.btn-export-tailwind:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-save {
    background: #ffc107;
    color: #333;
}

.btn-save:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-download-palette {
    background: #6f42c1;
    color: white;
}

.btn-download-palette:hover {
    background: #5a32a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

/* Color History */
.color-history {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

#historyList {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.history-item .color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.history-item .color-hex {
    font-family: monospace;
    font-size: 12px;
}

.history-item .delete-history {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-details {
    margin-top: 15px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row span:first-child {
    font-weight: 500;
    color: #555;
    min-width: 60px;
}

.detail-row span:last-child {
    flex: 1;
}

.btn-copy-small {
    padding: 2px 8px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

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

/* Toast */
.toast {
    visibility: hidden;
    min-width: 280px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    font-size: 14px;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* Responsive */
@media (max-width: 992px) {
    .palette-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .color-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group select,
    .control-group input[type="color"] {
        width: 100%;
    }
    
    .palette-grid {
        grid-template-columns: 1fr;
    }
    
    .palette-actions {
        flex-direction: column;
    }
    
    .palette-actions button {
        width: 100%;
    }
    
    .color-header h1 {
        font-size: 24px;
    }
}