/* Number Converter Interface */
.number-converter-interface {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.converter-main-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Converter Grid - Mobile First */
.converter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .converter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .converter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Format Cards */
.format-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.format-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.format-card:focus-within::before {
    transform: scaleX(1);
}

.format-card:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Format Header */
.format-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.format-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-width: 48px;
}

.format-badge-decimal {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.format-badge-binary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
}

.format-badge-hex {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.format-badge-octal {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff;
}

.format-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.format-base {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.format-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    background: #ffffff;
    color: #1f2937;
    transition: all 0.2s ease;
}

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

.format-input::placeholder {
    color: #9ca3af;
}

.input-action-btn {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.format-card:focus-within .input-action-btn,
.input-wrapper:hover .input-action-btn {
    opacity: 1;
    pointer-events: all;
}

.input-action-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

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

.clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Validation Message */
.validation-message {
    min-height: 1.5rem;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.5rem;
    padding-left: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.validation-message::before {
    content: '⚠';
    font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.action-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.action-btn-primary:active {
    transform: translateY(0);
}

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

.action-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.action-btn-tertiary {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid transparent;
}

.action-btn-tertiary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.action-btn svg {
    flex-shrink: 0;
}

@media (max-width: 639px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Info Panel */
.info-panel {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-header svg {
    color: #3b82f6;
    flex-shrink: 0;
}

.info-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    font-size: 0.9375rem;
    color: #1e3a8a;
    line-height: 1.6;
    padding-left: 0.5rem;
    border-left: 3px solid #3b82f6;
    padding-left: 0.75rem;
}

.info-item strong {
    color: #1e40af;
    font-weight: 600;
}

/* Mobile Optimizations */
@media (max-width: 639px) {
    .converter-main-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .format-card {
        padding: 1rem;
    }
    
    .format-header {
        gap: 0.5rem;
    }
    
    .format-title {
        font-size: 1rem;
    }
    
    .format-input {
        font-size: 0.875rem;
        padding: 0.75rem 2.5rem 0.75rem 0.875rem;
    }
    
    .info-panel {
        padding: 1rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .converter-main-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .format-card {
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
        border-color: #374151;
    }
    
    .format-title {
        color: #f9fafb;
    }
    
    .format-input {
        background: #111827;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .format-input:focus {
        border-color: #3b82f6;
    }
    
    .action-btn-secondary {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .action-btn-secondary:hover {
        background: #4b5563;
    }
}
