/* Combo Tools Workspace Layout */

.tools-workspace {
    display: flex;
    gap: 15px;
    max-width: 100%;
    margin: 0;
    padding: 0 10px 30px;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.tools-sidebar {
    width: 280px;
    min-width: 280px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
    height: fit-content;
    position: sticky;
    top: 10px;
}

.sidebar-header {
    margin-bottom: 15px;
}

.sidebar-header h3 {
    color: #00d4ff;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h3 span {
    color: rgba(224, 224, 224, 0.6);
    font-size: 0.9rem;
    font-weight: 400;
}

.tool-search {
    width: 100%;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.85rem;
}

.tool-search::placeholder {
    color: rgba(224, 224, 224, 0.4);
}

.tool-search:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
}

.tools-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 5px;
}

.tools-list::-webkit-scrollbar {
    width: 6px;
}

.tools-list::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.3);
    border-radius: 3px;
}

.tools-list::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.tools-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.tool-btn {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 0.88rem;
    min-height: 44px;
}

.tool-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateX(5px);
}

.tool-btn.active {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.tool-icon {
    width: 28px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.tool-name {
    font-weight: 500;
    line-height: 1.2;
    word-wrap: break-word;
}

/* Main Workspace */
.tools-main {
    flex: 1;
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    padding: 20px 25px;
    backdrop-filter: blur(10px);
}

.tool-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.tool-header h2 {
    color: #00d4ff;
    font-size: 1.6rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.tool-header p {
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Tool Options */
.tool-options {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    display: none;
}

.tool-options.active {
    display: block;
}

.tool-options input {
    width: 100%;
    padding: 10px 12px;
    margin: 8px 0;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.tool-options input::placeholder {
    color: rgba(224, 224, 224, 0.4);
}

.tool-options label {
    color: #00d4ff;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

.tool-options textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    margin: 8px 0;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    resize: vertical;
    box-sizing: border-box;
}

/* Input/Output Container */
.io-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.section-header label {
    color: #00d4ff;
    font-size: 1.05rem;
    font-weight: 600;
}

.input-actions,
.output-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    color: #00d4ff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-1px);
}

#mainInput,
#mainOutput {
    flex: 1;
    min-height: calc(100vh - 450px);
    padding: 12px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.5;
    box-sizing: border-box;
}

#mainInput::placeholder,
#mainOutput::placeholder {
    color: rgba(224, 224, 224, 0.3);
}

#mainInput:focus,
#mainOutput:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(20, 20, 20, 0.8);
}

.input-stats,
.output-stats {
    margin-top: 6px;
    padding: 6px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 4px;
    text-align: center;
}

.input-stats span,
.output-stats span {
    color: #00d4ff;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Process Button */
.process-section {
    text-align: center;
    margin-top: 8px;
}

.process-btn {
    padding: 14px 60px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 212, 255, 0.5));
    border: 2px solid rgba(0, 212, 255, 0.6);
    border-radius: 8px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.process-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(0, 212, 255, 0.6));
    border-color: rgba(0, 212, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

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

/* Welcome Container Spacing */
.welcome-container {
    margin-bottom: 20px;
    padding: 0 10px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(15px);
    color: #e0e0e0;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    min-width: 220px;
    max-width: 320px;
}

.toast.toast-enter {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-exit {
    animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.88rem;
    font-weight: 500;
    color: #00d4ff;
}

@keyframes slideInRight {
    from {
        transform: translateX(350px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(350px);
        opacity: 0;
    }
}

/* File Upload Button */
.upload-file-btn {
    position: relative;
    overflow: hidden;
}

.upload-file-btn input[type="file"] {
    position: absolute;
    left: -9999px;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .tools-workspace {
        gap: 12px;
        padding: 0 8px 25px;
    }
    
    .tools-sidebar {
        width: 260px;
        min-width: 260px;
    }
    
    .tools-main {
        padding: 18px 20px;
    }
}

@media (max-width: 968px) {
    .tools-workspace {
        flex-direction: column;
        padding: 0 10px 20px;
    }

    .tools-sidebar {
        width: 100%;
        min-width: 100%;
        position: static;
        margin-bottom: 15px;
    }

    .tools-list {
        max-height: 250px;
    }

    .io-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #mainInput,
    #mainOutput {
        min-height: 300px;
    }

    .process-btn {
        width: 100%;
        padding: 14px;
    }
    
    .tools-main {
        padding: 15px;
    }
}

@media (max-width: 640px) {
    .tools-workspace {
        padding: 0 5px 15px;
    }

    .tools-main {
        padding: 12px;
    }

    .tool-header h2 {
        font-size: 1.4rem;
    }
    
    .tool-header p {
        font-size: 0.88rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .input-actions,
    .output-actions {
        width: 100%;
    }

    .action-btn {
        flex: 1;
        font-size: 0.75rem;
    }
    
    .tool-btn {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}