.compass-converter-widget {
    max-width: 500px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
}

/* Dark Theme */
.compass-converter-widget.dark .converter-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light Theme */
.compass-converter-widget.light .converter-container {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.converter-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.converter-input-group {
    flex: 1;
}

.converter-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dark .converter-input-group label {
    color: #94a3b8;
}

.light .converter-input-group label {
    color: #64748b;
}

.converter-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dark .converter-input {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .converter-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #3b82f6;
    outline: none;
}

.light .converter-input {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
}

.light .converter-input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    outline: none;
}

.converter-input[readonly] {
    cursor: default;
}

.dark .converter-input[readonly] {
    background: rgba(255, 255, 255, 0.03);
}

.light .converter-input[readonly] {
    background: #f8fafc;
}

.converter-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.dark .converter-arrow {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.light .converter-arrow {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.converter-info {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dark .converter-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light .converter-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.price-info, .bnb-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.converter-info .label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark .converter-info .label {
    color: #64748b;
}

.light .converter-info .label {
    color: #64748b;
}

.price-value, .bnb-value {
    font-size: 16px;
    font-weight: 700;
}

.dark .price-value,
.dark .bnb-value {
    color: #10b981;
}

.light .price-value,
.light .bnb-value {
    color: #059669;
}

.converter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.refresh-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.dark .refresh-button {
    background: #3b82f6;
    color: #ffffff;
}

.dark .refresh-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.light .refresh-button {
    background: #3b82f6;
    color: #ffffff;
}

.light .refresh-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.refresh-button:active {
    transform: translateY(0);
}

.refresh-button svg {
    transition: transform 0.6s ease;
}

.refresh-button.rotating svg {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.last-updated {
    font-size: 11px;
    font-style: italic;
}

.dark .last-updated {
    color: #64748b;
}

.light .last-updated {
    color: #94a3b8;
}

.converter-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .converter-container {
        padding: 20px;
    }
    
    .converter-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .converter-arrow {
        transform: rotate(90deg);
    }
    
    .converter-info {
        grid-template-columns: 1fr;
    }
    
    .converter-footer {
        flex-direction: column;
    }
    
    .refresh-button {
        width: 100%;
        justify-content: center;
    }
}

/* Number input arrows removal */
.converter-input::-webkit-outer-spin-button,
.converter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.converter-input[type=number] {
    -moz-appearance: textfield;
}

/* Error notification */
.converter-error {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ef4444;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
