/* Premium CSS for Tools Hub */

.tools-header {
    text-align: center;
    padding: 140px 20px 40px;
    background: radial-gradient(circle at center top, rgba(99, 102, 241, 0.05), transparent 60%);
}

.tools-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 100px;
}

.tools-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.tools-sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tools-sidebar li {
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.tools-sidebar li:hover {
    background: var(--bg-glass);
    color: var(--text-main);
    transform: translateY(-2px);
}

.tools-sidebar li.active {
    background: var(--bg-glass);
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tool-icon {
    font-size: 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Glass Card Content */
.tools-content {
    flex: 1;
    padding: 48px;
    min-height: 500px;
}

.view-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.view-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.view-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Form Styles */
.input-row {
    display: flex;
    gap: 24px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-view input,
.tool-view textarea,
.styled-select {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-glass);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    resize: vertical;
}

.styled-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.tool-view input:focus,
.tool-view textarea:focus,
.styled-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.tool-view .btn-primary {
    width: 100%;
    margin-top: 16px;
    font-size: 1.1rem;
}

/* Result Styles */
.tool-result {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    line-height: 1.8;
    color: #e2e8f0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tool-result h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #fff;
    font-size: 1.2rem;
}

.tool-result h3:first-child {
    margin-top: 0;
}

.tool-result p {
    margin-bottom: 16px;
}

.tool-result ul {
    margin-left: 24px;
    margin-bottom: 24px;
}

.tool-result li {
    margin-bottom: 8px;
}

.tool-result hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 32px 0;
}

.tool-view {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tool-view.active {
    display: block;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .tools-layout {
        flex-direction: column;
    }

    .tools-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        margin-bottom: 24px;
    }

    .tools-sidebar ul {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 16px;
    }

    .tools-sidebar li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .tools-content {
        padding: 24px;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }
}