/* Tools Page Specific Styles */

/* Tools Header */
.tools-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #6366f1, #7c3aed, #00CFFF);
    color: white;
    text-align: center;
}

.tools-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.tools-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Tools Controls */
.tools-controls {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.search-box input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    width: 300px;
    box-shadow: var(--shadow-light);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: white;
    box-shadow: var(--shadow-light);
    cursor: pointer;
}

/* Tools Grid */
.tools-grid-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Tool Card */
.tool-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
}

.tool-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-image img {
    transform: scale(1.1);
}

.tool-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(99, 102, 241, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover .tool-overlay {
    opacity: 1;
}

/* Tool Content */
.tool-content {
    padding: 2rem;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    margin-right: 1rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-badge.running {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.coming-soon {
    background: #fed7aa;
    color: #9a3412;
}

.tool-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-cost {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.tool-cost strong {
    color: #6366f1;
    font-weight: 700;
}

.tool-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-secondary:hover {
    background: #6366f1;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 95vw;
    max-height: 95vh;
    width: 1200px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* Demo Container */
.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    min-height: 500px;
}

.demo-input-section h3,
.demo-output-section h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Pipeline Visualization */
.pipeline-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pipeline-box {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 150px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.pipeline-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.pipeline-box label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.pipeline-box select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

.pipeline-box.special-box {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: white;
}

.pipeline-box.special-box label {
    color: white;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
}

.pipeline-box small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: #6366f1;
    font-weight: bold;
}

/* Demo Input */
.demo-input {
    margin-bottom: 2rem;
}

.demo-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-input textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.demo-input textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Scheduling Options */
.scheduling-options {
    margin-bottom: 2rem;
}

.scheduling-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.schedule-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.schedule-controls input[type="radio"] {
    margin-right: 0.5rem;
}

.schedule-controls select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

/* Demo Run Button */
.demo-run-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Demo Output */
.demo-output-section {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.demo-log {
    background: var(--dark-bg);
    color: #00ff00;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.demo-log .log-entry {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: logEntryFadeIn 0.5s ease forwards;
}

@keyframes logEntryFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.demo-log .log-success {
    color: #00ff00;
}

.demo-log .log-info {
    color: #00CFFF;
}

.demo-log .log-warning {
    color: #fbbf24;
}

/* Demo Result */
.result-preview {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-light);
}

.result-preview img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.result-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.result-info strong {
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .demo-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .pipeline-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pipeline-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .tools-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }
    
    .filter-controls {
        justify-content: center;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-content {
        padding: 1.5rem;
    }
    
    .pipeline-box {
        min-width: 120px;
        padding: 1rem;
    }
}