/* Random Quotes & Facts Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Анимированный фон */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Сканирующие линии */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation: scanline 3s linear infinite;
    z-index: 1;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    font-weight: 300;
}

.generator-card {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

/* Навигация по вкладкам */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 300;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.tab-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

/* Содержимое вкладок */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

.content-section {
    text-align: center;
}

/* Отображение цитат */
.quote-display {
    margin-bottom: 30px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.quote-display::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: serif;
}

.quote-text {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.quote-author {
    font-size: 1.1rem;
    color: #cccccc;
    font-weight: 300;
    text-align: right;
}

/* Отображение фактов */
.fact-display {
    margin-bottom: 30px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.fact-display::before {
    content: '💡';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.fact-text {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.fact-category {
    font-size: 1rem;
    color: #cccccc;
    font-weight: 300;
    text-align: right;
}

/* Селектор категорий */
.category-selector {
    margin-bottom: 30px;
}

.category-selector label {
    display: block;
    margin-bottom: 10px;
    color: #cccccc;
    font-size: 1.1rem;
}

.select {
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Кнопки */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.generate-btn, .copy-btn {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 300;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.generate-btn::before, .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;
}

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

.generate-btn:hover, .copy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.generate-btn:active, .copy-btn:active {
    transform: translateY(-1px);
}

.copy-btn {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 255, 255, 0.5);
}

.copy-btn:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Статистика */
.stats-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.stat-label {
    display: block;
    color: #cccccc;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Футер */
.footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
}

.back-link {
    color: #cccccc;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 300;
    transition: all 0.3s ease;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: inline-block;
}

.back-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Анимации */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 1s ease-in-out infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .generator-card {
        padding: 20px;
    }
    
    .tab-navigation {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .generate-btn, .copy-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .quote-text, .fact-text {
        font-size: 1.2rem;
    }
    
    .quote-display, .fact-display {
        padding: 20px;
    }
}
