.grayscale-converter {
    margin-bottom: 2rem;
}

.converter-main {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.input-section {
    display: flex;justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.color-input-wrapper,
.method-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.input-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.color-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.color-text-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    
    transition: all 0.2s ease;
    background: #ffffff;
}

.color-text-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.color-picker-btn {
    width: 56px;
    height: auto;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.color-picker-btn:hover {
    border-color: #3b82f6;
    transform: scale(1.05);
}

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

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

.method-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.method-tab {
    padding: 0.625rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.method-tab:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.method-tab.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
}

.preview-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.preview-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.color-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f9fafb;
}

.original-color-box {
    border: 2px solid #e5e7eb;
}

.grayscale-color-box {
    border: 2px solid #1f2937;
    background: #ffffff;
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.color-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
    z-index: 1;
}

.color-swatch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-color: inherit;
}

.color-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.color-value {
    font-size: 1.125rem;
    font-weight: 700;
    
    color: #111827;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-value:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.color-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    
    color: #111827;
    cursor: pointer;
    transition: color 0.2s ease;
}

.detail-value:hover {
    color: #3b82f6;
}

.actions-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.primary-btn {
    background: #3b82f6;
    color: #ffffff;
}

.primary-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.secondary-btn {
    background: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.secondary-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.methods-grid {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.methods-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.methods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.method-card {
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

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

.method-card.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.method-preview {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.method-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    z-index: 1;
}

.method-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-color: inherit;
}

.method-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.method-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.method-value {
    font-size: 0.75rem;
    
    color: #3b82f6;
    font-weight: 500;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.info-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.info-text {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast {
    background: #111827;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

@media (max-width: 768px) {
    .converter-main {
        padding: 1.5rem;
    }

    .preview-section {
        grid-template-columns: 1fr;
    }

    .method-tabs {
        justify-content: center;
    }

    .method-tab {
        flex: 1;
        min-width: 0;
    }

    .methods-list {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .actions-section {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }
}

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

    .color-input-group {
        flex-direction: column;
    }

    .color-picker-btn {
        width: 100%;
        height: 48px;
    }

    .method-tabs {
        flex-direction: column;
    }

    .method-tab {
        width: 100%;
    }
}
