/* Tool-specific styles */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.tool-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.input-section {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.input-label i {
    color: var(--primary-color);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

#count {
    width: 120px;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#count:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.mode-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.mode-option input[type="radio"] {
    margin: 0;
}

.mode-option:hover,
.mode-option input[type="radio"]:checked + .mode-option {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.mode-option i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.mode-option input[type="radio"]:checked + .mode-option i {
    color: white;
}

#generate {
    display: block;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#generate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#generate:hover::before {
    left: 100%;
}

#generate:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.output-section {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.output-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
}

.output-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.output-label i {
    color: var(--primary-color);
}

#output {
    width: 100%;
    min-height: 200px;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.6;
    resize: none;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.output-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: rgba(247, 147, 30, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(247, 147, 30, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.copy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.copy-btn:hover::before {
    left: 100%;
}

.copy-btn:active::before {
    width: 300px;
    height: 300px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: rgba(40, 167, 69, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid var(--success-color, #28a745);
    color: #28a745;
    animation: pulse 0.6s ease, glow 1s ease-in-out infinite alternate;
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.8);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: rgba(247, 147, 30, 0.2);
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: none;
    font-weight: 500;
}

.toast.show {
    display: block;
    transform: translateX(0);
    animation: toastSlide 0.3s ease-out;
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    animation: progress 3s linear;
}

@keyframes toastSlide {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0; }
}

@keyframes slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    color: white;
    animation: pulse 2s infinite;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.feature-highlight {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 129, 180, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.feature-highlight h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-highlight p {
    color: var(--text-secondary);
    margin: 0;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.back-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }

    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .mode-group {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
    }

    #output {
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .mode-group {
        gap: 0.75rem;
    }

    .mode-option {
        padding: 0.5rem 1rem;
    }
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(40, 167, 69, 0.4); }
    to { box-shadow: 0 0 30px rgba(40, 167, 69, 0.8); }
}
