/* Recursive Split Calculator - Styles */

.rsc-calculator {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.rsc-calculator h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.rsc-description {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

/* Tabs */
.rsc-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #ecf0f1;
}

.rsc-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.rsc-tab-btn:hover {
    color: #3498db;
}

.rsc-tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Tab Content */
.rsc-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.rsc-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Group */
.rsc-input-group {
    margin-bottom: 20px;
}

.rsc-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.rsc-input-group input[type="number"] {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.rsc-input-group input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

/* Button */
.rsc-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.rsc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

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

/* Result Box */
.rsc-result {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    min-height: 50px;
}

.rsc-result:empty {
    display: none;
}

.rsc-result h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.rsc-result-item {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.rsc-result-item:last-child {
    border-bottom: none;
}

.rsc-result-label {
    font-weight: 600;
    color: #34495e;
    margin-right: 8px;
}

.rsc-result-value {
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

/* Valid/Invalid Badge */
.rsc-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-left: 10px;
}

.rsc-badge.valid {
    background: #d4edda;
    color: #155724;
}

.rsc-badge.invalid {
    background: #f8d7da;
    color: #721c24;
}

/* Sequence Display */
.rsc-sequence {
    background: #ffffff;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
}

.rsc-sequence-step {
    padding: 5px 0;
}

/* List Table */
.rsc-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rsc-list-table th {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.rsc-list-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
}

.rsc-list-table tr:last-child td {
    border-bottom: none;
}

.rsc-list-table tr:hover {
    background: #f8f9fa;
}

.rsc-list-table .number {
    font-weight: 600;
    color: #3498db;
}

.rsc-list-table .binary {
    font-family: 'Courier New', monospace;
    color: #7f8c8d;
}

.rsc-list-table .type {
    font-size: 12px;
    color: #95a5a6;
}

/* Loading */
.rsc-loading {
    text-align: center;
    padding: 30px;
    color: #3498db;
    font-size: 16px;
}

.rsc-loading span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 768px) {
    .rsc-calculator {
        padding: 20px;
        margin: 15px;
    }
    
    .rsc-tabs {
        flex-direction: column;
    }
    
    .rsc-tab-btn {
        width: 100%;
        text-align: left;
    }
    
    .rsc-input-group input[type="number"] {
        max-width: 100%;
    }
    
    .rsc-list-table {
        font-size: 12px;
    }
    
    .rsc-list-table th,
    .rsc-list-table td {
        padding: 8px;
    }
}
