:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f9f9f9;
    --primary-text: #030303;
    --secondary-text: #606060;
    --border-color: #e5e5e5;
    --hover-color: #f2f2f2;
    --accent-color: #065fd4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: var(--primary-bg);
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 400;
}

.search-container {
    display: flex;
    align-items: center;
    max-width: 640px;
    width: 100%;
}

#search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: 2px 0 0 2px;
    font-size: 16px;
}

.search-button {
    height: 40px;
    width: 64px;
    border: 1px solid var(--border-color);
    border-left: none;
    background-color: var(--secondary-bg);
    cursor: pointer;
}

/* Main Content */
.main-content {
    display: flex;
    margin-top: 56px;
    height: calc(100vh - 56px);
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--primary-bg);
    padding: 12px 0;
    height: 100%;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 56px;
}

.feeds-list {
    padding: 12px;
}

.feeds-list h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

/* Video Grid */
.video-grid-container {
    margin-left: 240px;
    padding: 24px;
    width: calc(100% - 240px);
    overflow-y: auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Video Card */
.video-card {
    background-color: var(--primary-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.video-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e5e5e5;
    display: block;
    margin: 0 auto;
}

.video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-feed {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-bg);
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.modal-content h2 {
    margin-bottom: 16px;
}

.modal-content input {
    width: 100%;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#save-feed {
    background-color: var(--accent-color);
    color: white;
}

/* Utility Classes */
.icon-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
}

.icon-button:hover {
    background-color: var(--hover-color);
}

.material-icons {
    font-size: 24px;
    color: var(--primary-text);
}

.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--accent-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 40px auto 16px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.empty-state {
    text-align: center;
    color: var(--secondary-text);
    font-size: 18px;
    margin-top: 48px;
}

.feed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 16px 0;
    padding: 24px 0;
    font-size: 16px;
    color: var(--secondary-text);
    width: 100%;
    grid-column: 1 / -1;
}

.player-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--primary-bg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}
.player-back {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10;
}
.player-content {
    margin-top: 56px;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.player-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}
.player-info {
    width: 100%;
    padding: 24px 0 0 0;
}
.player-feed {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.player-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}
.player-meta {
    color: var(--secondary-text);
    font-size: 14px;
    margin-bottom: 16px;
}
.player-description {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--primary-text);
}
.player-original-link {
    color: var(--accent-color);
    font-size: 15px;
    text-decoration: underline;
}

.progress-card {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--primary-bg);
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px 24px 8px 24px;
    margin-bottom: 16px;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.progress-status {
    font-size: 15px;
    color: var(--primary-text);
    margin-bottom: 8px;
}
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.3s;
} 