/* Lighten Color Tool Styles */
.lighten-color-tool {
    margin-bottom: 2rem;
}

.tool-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tool-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Main Cards */
.input-card,
.preview-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-card:hover,
.preview-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--input-bg, #f8f9fa);
    border-radius: 8px;
    padding: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-input-group:focus-within {
    border-color: var(--primary-color, #007bff);
    background: var(--input-bg-focus, #ffffff);
}

.hex-prefix {
    font-weight: 600;
    color: var(--text-muted, #6c757d);
    font-size: 1rem;
    user-select: none;
}

.color-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    
    color: var(--text-primary, #1a1a1a);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-input::placeholder {
    color: var(--text-muted, #adb5bd);
    opacity: 0.5;
}

.color-picker-btn {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-picker-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-picker-btn::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-btn::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.intensity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.intensity-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--input-bg, #f8f9fa);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.intensity-input {
    width: 60px;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary, #1a1a1a);
    outline: none;
}

.percent-symbol {
    font-weight: 600;
    color: var(--text-muted, #6c757d);
    font-size: 0.875rem;
}

.slider-container {
    position: relative;
    padding: 1rem 0;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    transform: translateY(-50%);
    border-radius: 4px;
    background: linear-gradient(to right, #2C3E50, #ffffff);
    pointer-events: none;
    transition: background 0.3s ease;
}

.intensity-slider {
    position: relative;
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
    z-index: 1;
}

.intensity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color, #007bff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.intensity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.intensity-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--primary-color, #007bff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.intensity-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
}

.preset-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .preset-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.preset-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--input-bg, #f8f9fa);
    color: var(--text-primary, #1a1a1a);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: var(--primary-color, #007bff);
    background: var(--primary-light, #e7f3ff);
    transform: translateY(-2px);
}

.preset-btn--active {
    background: var(--primary-color, #007bff);
    color: #ffffff;
    border-color: var(--primary-color, #007bff);
}

.preset-btn--active:hover {
    background: var(--primary-dark, #0056b3);
    border-color: var(--primary-dark, #0056b3);
}

/* Preview Section */
.preview-section,
.values-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0;
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-swatch {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.swatch-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.swatch-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.color-swatch:hover .swatch-preview {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.swatch-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.swatch-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swatch-value {
    font-size: 1rem;
    font-weight: 700;
    
    color: var(--text-primary, #1a1a1a);
    letter-spacing: 1px;
}

.color-arrow {
    color: var(--text-muted, #6c757d);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Values Card */
.values-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .values-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.value-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.value-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--input-bg, #f8f9fa);
    border-radius: 8px;
    gap: 0.75rem;
}

.value-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted, #6c757d);
    min-width: 40px;
}

.value-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: flex-end;
}

.value-code {
    
    font-size: 0.875rem;
    color: var(--text-primary, #1a1a1a);
    background: transparent;
    padding: 0;
}

.copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary-color, #007bff);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-button:hover {
    background: var(--primary-dark, #0056b3);
    transform: scale(1.1);
}

.copy-button:active {
    transform: scale(0.95);
}

/* Info Section */
.info-section {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .info-section {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.info-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light, #e7f3ff);
    border-radius: 8px;
    color: var(--primary-color, #007bff);
}

.info-content {
    flex: 1;
}

.info-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin: 0 0 0.5rem 0;
}

.info-text {
    font-size: 0.875rem;
    color: var(--text-secondary, #495057);
    line-height: 1.6;
    margin: 0;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-list li {
    font-size: 0.875rem;
    color: var(--text-secondary, #495057);
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color, #007bff);
    font-weight: bold;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #28a745;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    animation: toastSlideIn 0.3s ease-out, toastSlideOut 0.3s ease-in 1.7s forwards;
    pointer-events: auto;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .lighten-color-tool {
        margin-top: 1.5rem;
    }

    .input-card,
    .preview-card {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .preview-content {
        flex-direction: column;
    }

    .color-arrow {
        transform: rotate(90deg);
    }

    .color-swatch {
        min-width: 100%;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .lighten-color-tool {
        --card-bg: #1e1e1e;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --text-muted: #808080;
        --input-bg: #2a2a2a;
        --input-bg-focus: #333333;
        --border-color: #404040;
        --primary-color: #4a9eff;
        --primary-light: #1a3a5c;
        --primary-dark: #357abd;
    }
}
