:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(51, 65, 85, 0.9);
    --success-color: #4ade80;
    --warning-color: #facc15;
    --error-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Container === */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Header === */
header {
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 8px;
}

.icon-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* === Buttons === */
.btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: var(--error-color);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #475569;
}

.btn-secondary:hover {
    background: #334155;
}

/* === User Menu === */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    border-radius: 50px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e293b;
    border: var(--glass-border);
    border-radius: 12px;
    min-width: 200px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.user-dropdown hr {
    border: none;
    border-top: var(--glass-border);
    margin: 0.5rem 0;
}

.user-dropdown .logout-link {
    color: var(--error-color);
}

/* === Mobile Menu === */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.mobile-nav-link.logout {
    color: var(--error-color);
}

.mobile-nav hr {
    border: none;
    border-top: var(--glass-border);
    margin: 0.5rem 0;
}

/* === Main Content === */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* === Footer === */
.main-footer {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border-top: var(--glass-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* === Page Header === */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* === Cards === */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.idea-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.idea-card:hover {
    transform: translateY(-4px);
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.idea-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.idea-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === Forms === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    border: var(--glass-border);
    color: white;
    padding: 12px 14px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-color);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-divider {
    border: none;
    border-top: var(--glass-border);
    margin: 2rem 0;
}

.form-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* === Alerts === */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error-color);
}

.alert-warning {
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-color);
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.badge-success {
    background: rgba(74, 222, 128, 0.2);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(250, 204, 21, 0.2);
    color: var(--warning-color);
}

/* === Auth Page === */
.auth-container {
    display: flex;
    gap: 3rem;
    max-width: 900px;
    margin: 2rem auto;
    align-items: flex-start;
}

.auth-box {
    flex: 1;
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: var(--glass-border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab.active {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.1);
}

.auth-form {
    margin-top: 1.5rem;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-info {
    flex: 1;
    padding: 2rem;
}

.auth-info h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.auth-info ul {
    list-style: none;
}

.auth-info li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* === Profile Page === */
.profile-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.profile-sidebar {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.profile-user-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: var(--glass-border);
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 1rem;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.profile-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.profile-nav a.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.profile-content {
    min-height: 500px;
}

.profile-section {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.profile-section h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.profile-section h3 {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* API Key Cards */
.api-key-card {
    background: rgba(0, 0, 0, 0.2);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.api-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.api-key-header h3 {
    margin: 0;
    font-size: 1rem;
}

.api-key-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.api-key-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.api-key-input {
    flex: 1;
    font-family: monospace;
}

.btn-toggle-password {
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-password:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.api-help-link {
    color: var(--accent-color);
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.75rem;
}

.api-help-link:hover {
    text-decoration: underline;
}

/* Info Box */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.info-box p {
    margin-bottom: 0.75rem;
}

.info-box ul {
    margin-left: 1.25rem;
    color: var(--text-secondary);
}

.info-box li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* === Admin Styles === */
.admin-section {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.file-list {
    list-style: none;
    margin-top: 1rem;
}

.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-list li span {
    color: var(--text-primary);
}

.file-list li .file-actions {
    display: flex;
    gap: 0.5rem;
}

/* === YouTube Analyzer Styles === */
.analyzer-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Controls */
.controls-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 12px;
}

.mode-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
}

.filter-group {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 8px 12px;
    min-width: 120px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
}

.action-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.action-btn:hover {
    background: var(--accent-hover);
}

.action-btn:disabled {
    background: #475569;
    cursor: not-allowed;
}

/* Data Container */
.data-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

.video-section {
    width: 100%;
    overflow-x: auto;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-chip {
    background: rgba(30, 41, 59, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-chip strong {
    color: var(--text-primary);
    margin-left: 4px;
}

/* Video List */
.video-list-header {
    display: grid;
    grid-template-columns: 80px 120px 3fr 1fr 1fr 1.5fr 1fr 1fr 1fr;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: var(--glass-border);
    gap: 10px;
    align-items: center;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px 8px 0 0;
    position: sticky;
    top: 65px;
    z-index: 50;
}

.sortable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    user-select: none;
}

.sortable-header:hover {
    color: var(--accent-color);
}

.sortable-header.active {
    color: #60a5fa;
}

.sort-icon {
    font-size: 0.7rem;
    opacity: 0.5;
}

.sortable-header.active .sort-icon {
    opacity: 1;
}

.video-item {
    display: grid;
    grid-template-columns: 80px 120px 3fr 1fr 1fr 1.5fr 1fr 1fr 1fr;
    padding: 1rem;
    background: var(--card-bg);
    margin-bottom: 0.8rem;
    border-radius: 12px;
    border: var(--glass-border);
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-2px);
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

.thumbnail-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-title {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
}

.cell-date {
    font-size: 0.8em;
    color: var(--text-secondary);
    text-align: center;
}

.cell-views,
.cell-subs,
.cell-channel {
    font-size: 0.9em;
    color: #cbd5e1;
}

.cell-channel {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-contrib,
.cell-perf,
.cell-imp {
    display: flex;
    justify-content: center;
}

/* Briefing Sidebar */
.briefing-sidebar {
    position: sticky;
    top: 100px;
    background: rgba(30, 41, 59, 0.5);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    min-height: 400px;
}

.briefing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.briefing-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.ai-badge {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Tier Badges */
.tier-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 500;
}

.tier-micro {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.tier-small {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.tier-medium {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
}

.tier-large {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.tier-mega {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
}

.tier-default {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* Analysis Badges */
.badge-great {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-good {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-normal {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-high {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-mid {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.badge-low {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Loader */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1e293b;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    border: var(--glass-border);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s;
    max-height: 95vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

.no-result {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.error-msg {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem auto;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === Responsive === */
@media screen and (max-width: 1024px) {
    .header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .data-container {
        grid-template-columns: 1fr;
    }

    .briefing-sidebar {
        order: -1;
        min-height: auto;
        margin-bottom: 1.5rem;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static;
    }

    .auth-container {
        flex-direction: column;
    }

    .auth-info {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    header .container {
        gap: 1rem;
    }

    .user-name {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .search-wrapper {
        max-width: none;
    }

    .mode-tabs {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .filter-group {
        justify-content: space-between;
    }

    .video-list-header {
        display: none;
    }

    .video-item {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "thumb title"
            "thumb date"
            "stats stats"
            "badges badges";
        gap: 0.8rem;
        padding: 1rem;
    }

    .thumbnail-wrapper {
        grid-area: thumb;
        height: 75px;
    }

    .cell-date {
        grid-area: date;
        text-align: left;
        margin-top: 5px;
    }

    .cell-title {
        grid-area: title;
    }

    .cell-views {
        grid-area: stats;
        font-size: 0.85em;
    }

    .cell-subs,
    .cell-channel {
        display: none;
    }

    .cell-contrib,
    .cell-perf,
    .cell-imp {
        grid-area: badges;
        display: inline-flex;
        justify-content: flex-start;
        margin-right: 5px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* === New utility classes for responsiveness === */
.hero-section {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-card {
    cursor: default;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-padding {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.link-accent {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.link-accent:hover {
    color: var(--accent-hover);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* === Mobile Overrides for Clean Layout === */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Layout Reset */
    .container {
        padding: 0 1.25rem;
    }

    /* Header - Mobile Menu */
    .header-nav {
        display: none;
        /* Hide Desktop Menu */
    }

    .mobile-menu-toggle {
        display: flex;
        /* Show Hamburger */
    }

    .header-actions .btn {
        display: none;
        /* Hide Header Buttons on mobile */
    }

    /* Grids & Flex Stacking */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .auth-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    /* QR Grid Overwrite */
    .qr-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 20px;
    }

    /* Panel Reset for mobile */
    .panel {
        height: auto !important;
        min-height: auto;
    }

    /* Typography */
    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .btn-lg {
        width: 100%;
        padding: 0.8rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
}