/* ========================================
   Mirai Tools - Individual Tool Page Styles
   ======================================== */

/* Tool Header */
.tool-header {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.tool-header__content {
    max-width: 600px;
    margin: 0 auto;
}

.tool-header__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tool-header__description {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Tool Main */
.tool-main {
    padding: 40px 0 80px;
    background: var(--gray-50);
    min-height: 400px;
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Tool Input Section */
.tool-input-section {
    margin-bottom: 1.5rem;
}

.tool-label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.tool-input-group {
    display: flex;
    gap: 0.5rem;
}

.tool-input {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: var(--transition-fast);
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(104, 121, 239, 0.1);
}

.tool-input::placeholder {
    color: var(--gray-400);
}

.tool-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Tool Result */
.tool-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.result-loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-content {
    animation: fadeIn 0.3s ease;
}

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

.video-preview {
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-preview video {
    width: 100%;
    display: block;
}

.video-info {
    margin-bottom: 1rem;
}

.video-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.video-info p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.download-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.result-error {
    text-align: center;
    padding: 1rem;
}

.error-message {
    color: var(--error);
    margin-bottom: 1rem;
}

/* Tool Instructions */
.tool-instructions {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.tool-instructions h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.tool-instructions ol,
.tool-instructions ul {
    padding-left: 1.5rem;
}

.tool-instructions li {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

.tool-instructions p {
    color: var(--gray-600);
    line-height: 1.7;
}

/* Tool Features */
.tool-features {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.tool-features h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--black);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.feature-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .tool-container {
        padding: 1.5rem;
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .tool-input-group {
        flex-direction: column;
    }
    
    .tool-input-group .btn {
        width: 100%;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .download-options .btn {
        width: 100%;
    }
}
