/* Converter Section */
.objc-converter-section {
    margin-bottom: 2rem;
}

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

/* Converter Panel */
.converter-panel {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    min-height: 500px;
}

.converter-panel:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.output-panel {
    border-color: #3b82f6;
    border-width: 2px;
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.output-badge {
    background: #dbeafe;
    color: #1e40af;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
    transform: translateY(-1px);
}

.icon-btn:active:not(:disabled) {
    transform: translateY(0);
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.icon-btn svg {
    display: block;
}

/* Editor Container */
.editor-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    background: #1e1e1e;
    overflow: hidden;
}

.code-editor {
    width: 100%;
    height: 100%;
    min-height: 500px;
    font-size: 14px;
    line-height: 1.6;
}

/* Panel Footer */
.panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.convert-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.convert-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.convert-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
}

.btn-text {
    white-space: nowrap;
}

.output-status {
    display: flex;
    align-items: center;
}

.status-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.status-text.success {
    color: #059669;
}

.status-text.error {
    color: #dc2626;
}

/* Options Card */
.converter-options {
    margin-top: 2rem;
}

.options-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.options-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.25rem 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.option-item {
    display: flex;
    align-items: center;
}

.option-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
}

.option-input {
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.875rem;
    color: #111827;
    transition: all 0.2s ease;
    width: 100%;
}

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

.option-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.option-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-checkbox:hover .checkbox-custom {
    border-color: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .converter-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .converter-panel {
        min-height: 400px;
    }

    .editor-container {
        min-height: 350px;
    }
}

@media (max-width: 767px) {
    .objc-converter-section {
        margin-top: 1.5rem;
    }

    .converter-panel {
        border-radius: 12px;
        min-height: 350px;
    }

    .panel-header {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .panel-title {
        font-size: 1rem;
    }

    .panel-badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.625rem;
    }

    .editor-container {
        min-height: 300px;
    }

    .code-editor {
        font-size: 13px;
    }

    .panel-footer {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .footer-stats {
        justify-content: space-between;
        width: 100%;
    }

    .convert-btn {
        width: 100%;
        justify-content: center;
    }

    .options-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .panel-title-group {
        flex-wrap: wrap;
    }

    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .editor-container {
        min-height: 250px;
    }

    .code-editor {
        font-size: 12px;
    }
}

/* Loading State */
.convert-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.convert-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Animation */
.output-panel.success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0%, 100% {
        border-color: #3b82f6;
    }
    50% {
        border-color: #10b981;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
    }
}
