/* Tools Page CSS - Premium Overhaul */

/* --- Hero Section --- */
.tools-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    box-shadow: 0 25px 50px -12px rgba(30, 27, 75, 0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Abstract Background Shapes */
.tools-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}
.tools-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a5b4fc;
    letter-spacing: 0.5px;
}

.tools-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tools-hero p {
    color: #e2e8f0;
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
}

/* --- Tools Grid --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.tool-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Card Hover Glow Effect */
.tool-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
    transition: transform 0.4s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-card h3 {
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.tool-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Workspace Area --- */
.tool-workspace {
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 3rem;
    min-height: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
}

.tool-workspace.hidden {
    display: none;
}

.back-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateX(-3px);
}

/* Workspace Specifics */
.workspace-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.workspace-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: #0f172a;
    background: #fcfcfc;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #818cf8;
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Result Boxes */
.result-box {
    background: #f1f5f9;
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    text-align: center;
    border: 2px dashed #cbd5e1;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e1;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fcfcfc;
}

.drop-zone:hover {
    border-color: #6366f1;
    background: #eff6ff;
    transform: scale(1.01);
}

.drop-zone i {
    transition: color 0.3s ease;
}

.drop-zone:hover i {
    color: #6366f1 !important;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.preview-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tools-hero {
        padding: 3rem 1.5rem;
    }
    .tools-hero h1 {
        font-size: 2.5rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tool-workspace {
        padding: 1.5rem;
    }
    .workspace-header h2 {
        font-size: 1.5rem;
    }
}

.tools-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--primary-color);
}
