/* Сучасний дизайн з Glassmorphism + Neomorphism */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #f72585;
    --success: #4cc9f0;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass: rgba(255, 255, 255, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Головний контейнер */
.seo-keywords-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px;
    background: var(--gradient);
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Ефект скла (Glassmorphism) */
.seo-keywords-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Внутрішній контейнер */
.seo-keywords-container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

/* Заголовок */
.seo-keywords-title {
    text-align: center;
    color: white;
    margin: 0 0 40px;
    font-size: 42px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.seo-keywords-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, white, transparent);
    border-radius: 2px;
}

/* Форма пошуку */
.seo-keywords-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Блок пошуку */
.seo-keywords-search-box {
    display: flex;
    gap: 15px;
    background: white;
    padding: 8px;
    border-radius: 70px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seo-keywords-search-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Поле введення */
.seo-keywords-input {
    flex: 1;
    padding: 20px 30px;
    border: none;
    border-radius: 60px;
    font-size: 18px;
    outline: none;
    background: transparent;
    color: #333;
    font-weight: 500;
}

.seo-keywords-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Кнопка пошуку */
.seo-keywords-submit {
    padding: 0 50px;
    background: linear-gradient(135deg, var(--accent) 0%, #b5179e 100%);
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.seo-keywords-submit::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;
}

.seo-keywords-submit:hover::before {
    left: 100%;
}

.seo-keywords-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(247, 37, 133, 0.4);
}

/* Блок фільтрів */
.seo-keywords-filters {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.seo-filter-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.seo-filter-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.seo-filter-item label {
    font-weight: 600;
    color: white;
    min-width: 90px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.seo-filter-item input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    font-weight: 500;
}

.seo-filter-item input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Статистика */
.seo-keywords-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.seo-keywords-stats span {
    font-size: 18px;
    color: white;
    font-weight: 500;
}

.seo-keywords-stats strong {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-left: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Кнопки експорту */
.seo-keywords-export {
    display: flex;
    gap: 15px;
}

.seo-keywords-export-btn {
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.seo-keywords-export-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.seo-keywords-export-btn:hover::before {
    width: 300px;
    height: 300px;
}

.seo-keywords-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Сітка карток */
.seo-keywords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    perspective: 1000px;
}

/* Картка ключового слова */
.seo-keyword-card {
    position: relative;
    padding: 22px 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: fadeInUp 0.6s ease backwards;
    transform-style: preserve-3d;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Затримки для анімації карток */
.seo-keyword-card:nth-child(1) { animation-delay: 0.1s; }
.seo-keyword-card:nth-child(2) { animation-delay: 0.15s; }
.seo-keyword-card:nth-child(3) { animation-delay: 0.2s; }
.seo-keyword-card:nth-child(4) { animation-delay: 0.25s; }
.seo-keyword-card:nth-child(5) { animation-delay: 0.3s; }
.seo-keyword-card:nth-child(6) { animation-delay: 0.35s; }
.seo-keyword-card:nth-child(7) { animation-delay: 0.4s; }
.seo-keyword-card:nth-child(8) { animation-delay: 0.45s; }
.seo-keyword-card:nth-child(9) { animation-delay: 0.5s; }
.seo-keyword-card:nth-child(10) { animation-delay: 0.55s; }
.seo-keyword-card:nth-child(n+11) { animation-delay: 0.6s; }

.seo-keyword-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.2);
    border-color: white;
    background: white;
}

.seo-keyword-card.copied {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-color: white;
    transform: scale(1.05);
    color: white;
}

.seo-keyword-card.copied .seo-keyword-text {
    color: white;
}

.seo-keyword-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding-right: 40px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.seo-keyword-copy {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.seo-keyword-card:hover .seo-keyword-copy {
    opacity: 1;
    right: 15px;
}

.seo-keyword-copy:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

/* Лоадер */
.seo-keywords-loader {
    text-align: center;
    padding: 80px;
}

.seo-keywords-loader:after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Повідомлення про помилку */
.seo-keywords-error {
    text-align: center;
    padding: 40px;
    background: rgba(244, 67, 54, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-5px); }
}

/* Нотифікація */
.seo-keywords-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 18px 35px;
    background: rgba(76, 175, 80, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-radius: 60px;
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.3);
    animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

.seo-keywords-notification.error {
    background: rgba(244, 67, 54, 0.95);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) rotate(10deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

/* Адаптивність */
@media (max-width: 992px) {
    .seo-keywords-wrapper {
        padding: 25px;
        margin: 30px 15px;
    }
    
    .seo-keywords-container {
        padding: 30px;
    }
    
    .seo-keywords-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .seo-keywords-wrapper {
        padding: 20px;
    }
    
    .seo-keywords-container {
        padding: 25px;
    }
    
    .seo-keywords-search-box {
        flex-direction: column;
        border-radius: 30px;
    }
    
    .seo-keywords-input {
        text-align: center;
    }
    
    .seo-keywords-submit {
        padding: 15px;
        width: 100%;
    }
    
    .seo-keywords-filters {
        flex-direction: column;
    }
    
    .seo-filter-item {
        width: 100%;
    }
    
    .seo-keywords-stats {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .seo-keywords-title {
        font-size: 28px;
    }
    
    .seo-keywords-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .seo-keywords-container {
        padding: 20px;
    }
    
    .seo-keywords-title {
        font-size: 24px;
    }
    
    .seo-keyword-card {
        padding: 18px 20px;
    }
}