/* ============================================
   RESET & BASE STYLES
   ============================================ */
.t10t-main-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ============================================
   VIEW TOGGLE
   ============================================ */
.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.toggle-button {
    padding: 12px 25px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.toggle-button:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.toggle-button.active {
    background: #0073aa;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* ============================================
   GRID VIEW
   ============================================ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
}

.video-grid-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #eee;
}

.video-grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.grid-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.grid-media {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #000;
}

.grid-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-grid-item:hover .grid-media img {
    transform: scale(1.05);
}

.no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.video-grid-views {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
}

.video-grid-author {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.author-grid-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   FEED VIEW (SINGLE VIDEO CARD)
   ============================================ */
.video-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 680px;
    margin: 0 auto;
}

.video-feed-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    padding: 0;
}

/* HEADER */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.video-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #0073aa;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details {
    flex: 1;
}

.author-name {
    font-weight: 700;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    display: block;
    margin-bottom: 3px;
}

.author-name:hover {
    color: #0073aa;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 0;
    line-height: 1.4;
}

.video-header-actions {
    display: flex;
    align-items: center;
}

/* VIDEO PLAYER */
.video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    margin: 0;
    padding: 0;
}

.video-player-wrapper video {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    background: #000;
}

/* FOOTER */
.video-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    gap: 10px;
}

.footer-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 70px;
}

.footer-item:hover {
    background: #f5f5f5;
    color: #0073aa;
    transform: translateY(-2px);
}

.footer-item i {
    font-size: 22px;
    margin-bottom: 5px;
}

.footer-item.liked {
    color: #ff4757;
}

.footer-item .count {
    font-weight: 600;
    font-size: 12px;
}

/* COMMENTS */
.t10t-comments-container {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.t10t-comments-wrapper {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.t10t-comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

/* Custom scrollbar */
.t10t-comments-list::-webkit-scrollbar {
    width: 6px;
}

.t10t-comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.t10t-comments-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.t10t-comments-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ============================================
   COMMENTS STYLES
   ============================================ */
.t10t-comment {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
}

.t10t-comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.t10t-comment-main {
    position: relative;
}

.t10t-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.t10t-comment-author {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.t10t-comment-author:hover {
    color: #0073aa;
}

.t10t-comment-time {
    font-size: 12px;
    color: #999;
}

.t10t-comment-body {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    margin-bottom: 10px;
}

.t10t-comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.t10t-comment-action-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 8px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.t10t-comment-action-btn:hover {
    background: #f5f5f5;
    color: #0073aa;
}

.t10t-comment-action-btn.liked {
    color: #ff4757;
}

.t10t-comment-action-btn i {
    font-size: 14px;
}

/* ============================================
   COMMENT FORM
   ============================================ */
.t10t-comment-form {
    margin-top: 20px;
}

.t10t-comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border 0.3s ease;
}

.t10t-comment-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.t10t-submit-comment {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.t10t-submit-comment:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.t10t-submit-comment:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.t10t-login-note {
    text-align: center;
    padding: 20px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
}

.t10t-login-note a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.t10t-login-note a:hover {
    text-decoration: underline;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.t10t-no-videos,
.t10t-no-comments {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-size: 16px;
    background: #fafafa;
    border-radius: 12px;
    margin: 20px 0;
}

.t10t-loading,
.t10t-loading-comments {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
}

.t10t-loading:after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .t10t-main-content {
        padding: 10px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .grid-media {
        height: 200px;
    }
    
    .video-feed {
        gap: 20px;
    }
    
    .video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .video-header-actions {
        align-self: flex-end;
    }
    
    .video-footer {
        padding: 12px 15px;
        gap: 5px;
    }
    
    .footer-item {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .footer-item i {
        font-size: 20px;
    }
    
    .toggle-button {
        padding: 10px 15px;
        min-width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .grid-media {
        height: 180px;
    }
    
    .video-footer {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .footer-item {
        min-width: 45px;
        padding: 5px;
        font-size: 12px;
    }
    
    .footer-item i {
        font-size: 18px;
        margin-bottom: 3px;
    }
}

/* ============================================
   PLYR PLAYER CUSTOMIZATIONS
   ============================================ */
.plyr {
    --plyr-color-main: #0073aa;
    --plyr-control-radius: 8px;
    --plyr-control-icon-size: 18px;
    --plyr-control-spacing: 10px;
    --plyr-video-controls-background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    overflow: hidden;
}

.plyr__video-wrapper {
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.t10t-error {
    color: #ff4757;
    text-align: center;
    padding: 15px;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #ffcccc;
    margin: 10px 0;
}

.t10t-success {
    color: #2ed573;
    text-align: center;
    padding: 15px;
    background: #f0fff4;
    border-radius: 8px;
    border: 1px solid #ccffcc;
    margin: 10px 0;
}