/* ========================================
   SUPER TOOLS - MODERN DESIGN
   Página de Herramientas IA completamente rediseñada
   ======================================== */

/* ========================================
   MAIN CONTAINER
   ======================================== */

.super-tools-main {
    min-height: 100vh;
    padding: 2rem 0 4rem;
    background: var(--primary-bg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.super-hero {
    text-align: center;
    padding: 3rem 0 4rem;
    position: relative;
}

.super-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

.super-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.super-hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   FILTER TABS
   ======================================== */

.super-filter-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.filter-tab i {
    font-size: 1.1rem;
}

/* ========================================
   TOOLS GRID
   ======================================== */

.super-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ========================================
   TOOL CARD
   ======================================== */

.super-tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.super-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.super-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

.super-tool-card:hover::before {
    opacity: 1;
}

/* Tier Badge */
.tool-tier-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-premium {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-admin {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Tool Icon */
.tool-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tool-icon i {
    font-size: 2rem;
    color: white;
}

/* Tool Content */
.tool-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Tool Features */
.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tool-features span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.tool-features i {
    font-size: 0.85rem;
}

/* Tool Button */
.tool-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.tool-btn:active {
    transform: translateY(0);
}

/* ========================================
   TOOL MODAL
   ======================================== */

.tool-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem;
}

.tool-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tool-modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.tool-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.tool-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg);
}

/* Modal Body */
.tool-modal-body {
    padding: 2rem;
}

.modal-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Input Container */
.input-container {
    margin-bottom: 2rem;
}

.input-ui {
    margin-bottom: 1.5rem;
}

.input-ui label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.input-ui textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-ui textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.upload-zone:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.upload-zone h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.file-info {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Process Button */
.btn-process {
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    margin-bottom: 2rem;
}

.btn-process:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.6);
    filter: brightness(1.15);
}

.btn-process:active {
    transform: translateY(0);
}

.btn-process i {
    font-size: 1.3rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Results Container */
.results-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.results-container h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.results-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
}

.results-content h1,
.results-content h2,
.results-content h3 {
    color: var(--accent-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.results-content ul,
.results-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.results-content code {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent-primary);
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-secondary {
    flex: 1;
    padding: 0.9rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 1023px) {
    .super-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .super-hero {
        padding: 2rem 0 3rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 767px) {
    .super-tools-main {
        padding: 1rem 0 3rem;
    }

    .container {
        padding: 0 1rem;
    }

    .super-hero {
        padding: 1.5rem 0 2rem;
    }

    .super-hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    .super-tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .super-tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        width: 70px;
        height: 70px;
    }

    .tool-icon i {
        font-size: 1.75rem;
    }

    .tool-title {
        font-size: 1.3rem;
    }

    .tool-desc {
        font-size: 0.9rem;
    }

    .filter-tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .filter-tab span {
        display: none;
    }

    .tool-modal {
        padding: 1rem;
    }

    .tool-modal-content {
        border-radius: 20px;
    }

    .tool-modal-header {
        padding: 1.5rem;
    }

    .tool-modal-header h2 {
        font-size: 1.4rem;
    }

    .tool-modal-body {
        padding: 1.5rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-zone i {
        font-size: 2.5rem;
    }

    .btn-process {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .results-actions {
        flex-direction: column;
    }
}

/* ========================================
   LIGHT MODE
   ======================================== */

[data-theme="light"] .super-tool-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .tool-modal-content {
    background: white;
}

[data-theme="light"] .input-ui textarea {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .upload-zone {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .results-container {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.15);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}