/* CSS Variables & Design Tokens */
:root {
    --bg-color: #09090b;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #ef4444;
    --accent-hover: #dc2626;
    --danger-color: #ef4444;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --font-primary: 'Inter', 'Noto Sans Georgian', sans-serif;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(239, 68, 68, 0.1), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    cursor: pointer;
    user-select: none;
}

.logo-accent {
    color: var(--danger-color);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.api-settings {
    display: none; /* Скрыто от обычных пользователей */
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.api-settings.visible {
    display: flex;
}

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

.api-input {
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    width: 200px;
}

.api-input:focus {
    border-color: var(--accent-color);
}

.btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.dropdown {
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.dropdown:focus {
    border-color: var(--accent-color);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-section {
    margin-bottom: 2rem;
    text-align: center;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Video Card */
.video-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 15px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
}

.thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background-color: rgba(239, 68, 68, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid white;
    margin-left: 5px;
}

.video-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-content {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.video-channel {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
}
