/* SortSmart App Stylesheet */

.sortsmart-container *, 
.sortsmart-container *::before, 
.sortsmart-container *::after {
    box-sizing: border-box;
}

.sortsmart-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f5f7;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: #1a1a1a;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Centered Dark Header Bar */
.sortsmart-header {
    background-color: transparent;
    padding: 15px 0;
    text-align: center;
    border-bottom: 2px solid #e1e4e8;
    margin-bottom: 25px;
}

.sortsmart-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Workspace Layout */
.sortsmart-workspace {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Control Panel Card Row */
.sortsmart-controls {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e1e4e8;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.control-group {
    flex: 1 1 220px;
    min-width: 200px;
}

.control-group h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.btn-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Interactive Neon Buttons */
.ss-btn {
    background-color: #39ff14;
    color: #1a1a1a !important;
    border: 1px solid #2ae00f;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.ss-btn:hover {
    background-color: #2ae00f;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
    transform: translateY(-1px);
}

.ss-btn:active {
    transform: translateY(1px);
}

.accent-btn {
    background-color: #1a1a1a;
    color: #39ff14 !important;
    border-color: #1a1a1a;
}
.accent-btn:hover {
    background-color: #2a2a2a;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.clear-btn {
    background-color: #e1e4e8;
    border-color: #d1d5db;
    color: #4b5563 !important;
    text-align: center;
}
.clear-btn:hover {
    background-color: #d1d5db;
    box-shadow: none;
}

.global-actions {
    display: flex;
    align-items: flex-end;
    flex: 1 1 100%;
}

/* Two Column Work Area (Input / Output) */
.sortsmart-panels {
    display: flex;
    gap: 20px;
    width: 100%;
}

.panel-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
}

.panel-header {
    background-color: #fafbfc;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-actions {
    display: flex;
    gap: 10px;
}

.action-link {
    background: #39ff14;
    border: 1px solid #2ae00f;
    color: #1a1a1a;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-link:hover {
    background-color: #2ae00f;
}

/* Responsive Textareas */
.panel-box textarea {
    width: 100%;
    height: 350px;
    padding: 15px;
    border: none;
    resize: vertical;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #fff;
    outline: none;
}

.panel-box textarea[readonly] {
    background-color: #fafbfc;
}

.panel-box textarea:focus {
    box-shadow: inset 0 0 0 2px #39ff14;
}

.panel-stats {
    background-color: #fafbfc;
    padding: 8px 16px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #e1e4e8;
}

/* Responsive Scaling Overrides */
@media (max-width: 768px) {
    .sortsmart-panels {
        flex-direction: column;
    }
    .panel-box textarea {
        height: 250px;
    }
    .sortsmart-controls {
        flex-direction: column;
    }
    .control-group {
        flex: 1 1 auto;
    }
}