/* Listicle Generator Tool Styles */

.listicle-generator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.listicle-generator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

/* Header Styles */
.listicle-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.listicle-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.listicle-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Input Section */
.listicle-input-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
}

#keyword-input {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2d3748;
}

#keyword-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#keyword-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.generate-button, .regenerate-button {
    padding: 18px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.generate-button:hover, .regenerate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.generate-button:active, .regenerate-button:active {
    transform: translateY(0);
}

.generate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.regenerate-button {
    width: 100%;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    animation: fadeInUp 0.5s ease-out;
}

.regenerate-button:hover {
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
}

/* Results Section */
.listicle-results {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.results-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out both;
}

.result-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-number {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.card-content {
    padding-right: 45px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
}

.copy-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3748 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn .copy-text,
.copy-btn .copy-icon {
    color: #2d3748 !important;
}

.copy-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.copy-btn.copied {
    background: #48bb78;
    border-color: #48bb78;
    color: white;
}

.results-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
    margin-top: 20px;
}

.tip {
    color: #4a5568;
    font-size: 1rem;
    margin: 0;
}

/* Features Section */
.listicle-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.feature {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.feature span:last-child {
    color: #2d3748;
    font-weight: 600;
    font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .listicle-generator-container {
        margin: 10px;
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .listicle-title {
        font-size: 2.2rem;
    }
    
    .listicle-subtitle {
        font-size: 1.1rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .generate-button {
        width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-header h3 {
        font-size: 1.5rem;
    }
    
    .card-content {
        padding-right: 0;
        padding-bottom: 45px;
    }
    
    .card-number {
        position: static;
        margin-left: auto;
        margin-bottom: 15px;
    }
    
    .listicle-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .listicle-generator-container {
        margin: 5px;
        padding: 15px 10px;
    }
    
    .listicle-title {
        font-size: 1.8rem;
    }
    
    .listicle-input-section,
    .listicle-results {
        padding: 20px 15px;
    }
    
    .listicle-features {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        padding: 15px;
    }
    
    .card-title {
        font-size: 1.05rem;
    }
}

/* Loading States */
.btn-loader {
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .listicle-generator-container {
        background: white !important;
        box-shadow: none !important;
    }
    
    .listicle-input-section,
    .listicle-features {
        display: none !important;
    }
    
    .result-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}