/* Tool Hero Styles - Required */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 820px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Color Inversion Tool Styles */
.inversion-tool {
    margin-top: 2rem;
}

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

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #1a202c;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: #718096;
}

.input-panel,
.output-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

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

.color-output-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-group-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.result-group .color-preview-large .color-fill{
    position: relative;height: 128px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker {
    width: 60px;
    height: 60px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

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

.color-preview-large {
    flex: 1;
    height: 120px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%), 
        linear-gradient(-45deg, #ccc 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ccc 75%), 
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.color-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.input-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-method {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.input-group-hex {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-group-hex:focus-within {
    border-color: #4299e1;
}

.input-prefix {
    padding: 0.75rem 0.5rem;
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    border-right: 1px solid #e2e8f0;
}

.input-field {
    flex: 1;
    padding: 0.75rem;
    border: none;
    outline: none;
    font-size: 1rem;
    
    color: #1a202c;
}

.rgb-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.rgb-input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    
    transition: border-color 0.2s;
}

.rgb-input:focus {
    outline: none;
    border-color: #4299e1;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a202c;
    
}

.info-value.copyable {
    cursor: pointer;
    transition: color 0.2s;
}

.info-value.copyable:hover {
    color: #4299e1;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f7fafc;
    border-color: #4299e1;
    color: #4299e1;
}

.action-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* Methods Section */
.methods-section {
    margin-top: 1.5rem;
}

.subsection-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #2d3748;
}

.subsection-description {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a202c;
}

.section-description {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1.5rem;
}

.methods-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.method-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
}

.method-card:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.method-card.active {
    border-color: #4299e1;
    background: #ebf8ff;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.2);
}

.method-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.method-content {
    flex: 1;
}

.method-name {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #1a202c;
}

.method-description {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Comparison Section */
.comparison-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.result-group .comparison-grid {
    margin-top: 0;
}

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

.comparison-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comparison-card.highlight {
    border-color: #4299e1;
    background: #ebf8ff;
}

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

.comparison-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.comparison-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4299e1;
    background: #bee3f8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.comparison-preview {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-image: 
        linear-gradient(45deg, #ccc 25%, transparent 25%), 
        linear-gradient(-45deg, #ccc 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #ccc 75%), 
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.comparison-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a202c;
    
}

/* Quick Colors Section */
.quick-colors-section {
    margin-top: 1.5rem;
}

.quick-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.quick-color {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    padding: 0;
    background: none;
}

.quick-color:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-color-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* Educational Content */
.educational-content {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.content-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.content-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    color: #1a202c;
}

.content-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem 0;
    color: #2d3748;
}

.content-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    color: #4a5568;
}

.content-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0 0 1rem 0;
}

.content-card ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.content-card li {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.content-card strong {
    font-weight: 700;
    color: #2d3748;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.content-block {
    flex: 1;
}

.tip-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #2c5282;
}

.tip-box strong {
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .color-picker-wrapper {
        flex-direction: column;
    }
    
    .color-preview-large {
        height: 100px;
    }
    
    .rgb-inputs {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .color-info-grid {
        grid-template-columns: 1fr;
    }
    
    .methods-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-group .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-colors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .panel-title {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .result-group .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-colors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
