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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --background: #000;
    --surface: #1a1a1a;
    --text: #fff;
    --text-secondary: #aaa;
    --error: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y;
}

/* Loading Screen */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--background);
    z-index: 9999;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Screen Management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* Auth Screen */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 48px;
    margin-bottom: 8px;
}

.logo p {
    font-size: 16px;
    opacity: 0.9;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-form h2 {
    margin-bottom: 24px;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 12px;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    font-size: 14px;
}

.error:not(:empty) {
    display: block;
}

.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    font-size: 14px;
}

.success:not(:empty) {
    display: block;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Feed Screen */
#feed-screen {
    display: flex;
    flex-direction: column;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo-small {
    font-size: 20px;
    font-weight: 700;
}

.top-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Video Container */
.video-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 70px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.video-container::-webkit-scrollbar {
    display: none;
}

.video-item {
    position: relative;
    width: 100%;
    height: calc(100vh - 130px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    max-width: 60%;
    z-index: 10;
}

.video-username {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.video-description {
    font-size: 14px;
    color: var(--text-secondary);
}

.hashtag-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.hashtag-link:hover {
    text-decoration: underline;
}

.video-actions {
    position: absolute;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 12px;
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn .icon {
    font-size: 28px;
}

.action-btn .count {
    font-size: 12px;
    margin-top: 4px;
}

.action-btn.liked .icon {
    content: '❤️';
}

.video-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10;
}

.volume-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.volume-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.volume-btn:active {
    transform: scale(0.95);
}

.delete-video-btn {
    position: absolute;
    top: 20px;
    right: 70px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.8);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.delete-video-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.delete-video-btn:active {
    transform: scale(0.95);
}

.more-options-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(5px);
    font-weight: bold;
    line-height: 1;
}

.more-options-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.more-options-btn:active {
    transform: scale(0.95);
}

/* Options Modal */
.options-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.options-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.options-modal-content h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 20px;
}

.option-btn {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(0);
}

.option-btn.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
    justify-content: center;
}

/* Report Dialog */
.report-dialog p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.report-reason,
.report-description {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.report-reason {
    cursor: pointer;
}

.report-description {
    resize: vertical;
    min-height: 80px;
}

.report-buttons {
    display: flex;
    gap: 12px;
}

.submit-report-btn,
.cancel-report-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-report-btn {
    background: var(--primary-color);
    color: white;
}

.submit-report-btn:hover {
    background: var(--primary-hover);
}

.cancel-report-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.cancel-report-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-btn.active {
    color: var(--text);
}

/* Upload Screen */
.upload-container {
    height: 100vh;
    overflow-y: auto;
    padding: 20px;
    background: var(--background);
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.upload-form {
    max-width: 600px;
    margin: 0 auto;
}

.file-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 8px;
}

.video-preview {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.upload-form input,
.upload-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

.upload-form input:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s;
}

/* === VIDEO EDITOR === */

.video-editor {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.video-editor h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.editor-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-btn {
    flex: 1;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: var(--border);
}

.editor-btn:active {
    transform: scale(0.98);
}

.trim-controls {
    margin-top: 16px;
}

.trim-timeline {
    margin-bottom: 16px;
}

.timeline-track {
    position: relative;
    height: 40px;
    background: var(--background);
    border-radius: 8px;
    cursor: pointer;
}

.trim-selection {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(255, 107, 107, 0.3);
    border-left: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    pointer-events: none;
}

.trim-handle {
    position: absolute;
    top: 0;
    width: 12px;
    height: 100%;
    background: var(--primary);
    cursor: ew-resize;
    z-index: 10;
}

.trim-handle:hover {
    background: var(--secondary);
}

.trim-start {
    left: 0;
    border-radius: 8px 0 0 8px;
}

.trim-end {
    right: 0;
    border-radius: 0 8px 8px 0;
}

.trim-info {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--background);
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.trim-info span {
    color: var(--text-secondary);
}

.video-info {
    background: var(--background);
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.video-info p {
    margin: 4px 0;
}

.video-info span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Profile Screen */
.profile-container {
    height: 100vh;
    overflow-y: auto;
    background: var(--background);
}

.profile-header {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.profile-info {
    text-align: center;
    padding: 40px 20px;
}

.profile-avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
}

.profile-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border: 3px solid var(--background);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.change-avatar-btn:hover {
    transform: scale(1.1);
}

.change-avatar-btn:active {
    transform: scale(0.95);
}

.edit-bio-btn {
    margin: 12px 0;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--text-secondary);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-bio-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
}

.profile-bio[contenteditable="true"] {
    border: 2px dashed var(--primary);
    padding: 8px;
    border-radius: 4px;
    outline: none;
    min-height: 40px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat span:first-child {
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0 4px 20px;
}

.profile-video-item {
    aspect-ratio: 9/16;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.profile-video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .video-container {
        max-width: 500px;
        margin: 0 auto;
    }

    .auth-container {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .video-info {
        font-size: 14px;
    }

    .video-actions {
        gap: 16px;
    }

    .action-btn .icon {
        font-size: 24px;
    }
}

/* Prevent text selection and highlighting */
.video-container,
.video-item,
.video-actions {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Follow Button */
.btn-follow {
    margin: 20px auto;
    padding: 12px 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-follow.following {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn-follow:hover {
    transform: scale(1.05);
}

.btn-follow.following:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-follow.following:hover .follow-text::after {
    content: 'Unfollow';
}

.btn-follow.following:hover .follow-text {
    display: none;
}

.btn-follow.following:hover::before {
    content: 'Unfollow';
}

.profile-bio {
    color: var(--text-secondary);
    margin: 12px 0;
    font-size: 14px;
}

/* Heart Animation for Double-tap */
.heart-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 80px;
    animation: heartPop 1s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) translateY(-30px);
        opacity: 0;
    }
}

/* Share button improvements */
.share-btn {
    transition: transform 0.2s;
}

.share-btn:active {
    transform: scale(0.9);
}

/* Hashtag styling in descriptions */
.hashtag {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

.hashtag:hover {
    text-decoration: underline;
}

/* Mention styling */
.mention {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.mention:hover {
    text-decoration: underline;
}

/* Messages Screen */
.messages-container {
    padding: 60px 0 80px;
    height: 100vh;
    overflow-y: auto;
}

.messages-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.messages-header h2 {
    margin: 0;
    font-size: 20px;
}

.conversations-list {
    padding: 16px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.conversation-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.conversation-item-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-item-info {
    flex: 1;
    min-width: 0;
}

.conversation-item-username {
    font-weight: 600;
    margin-bottom: 4px;
}

.conversation-item-last-message {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item-unread {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Conversation Screen */
.conversation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.conversation-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.conversation-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversation-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.conversation-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-username {
    font-weight: 600;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 70px 16px 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    display: flex;
    gap: 8px;
    max-width: 80%;
}

.message-item.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.message-bubble {
    background: var(--surface);
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
}

.message-item.own .message-bubble {
    background: var(--primary);
}

.message-text {
    margin: 0;
    font-size: 15px;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.message-input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.message-input {
    flex: 1;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-message-btn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 18px;
}

.send-message-btn:active {
    transform: scale(0.9);
}

.send-message-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === GROUP CHATS === */

.create-group-container {
    padding: 60px 16px 80px;
    height: 100vh;
    overflow-y: auto;
}

.create-group-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 100;
}

.create-group-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.create-group-form {
    padding: 16px;
}

.create-group-form h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.create-group-form input[type="text"] {
    width: 100%;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 8px;
}

.create-group-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.participant-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.participant-input-container input {
    flex: 1;
    margin-bottom: 0;
}

.selected-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    min-height: 40px;
}

.participant-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.participant-chip .remove-participant {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    line-height: 1;
}

.participant-chip .remove-participant:hover {
    color: var(--error);
}

.conversation-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversation-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.group-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

/* === NOTIFICATION TOAST === */

.notification-toast {
    position: fixed;
    top: 80px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

.notification-toast.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .notification-toast {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* Bookmark button */
.bookmark-btn .icon {
    transition: transform 0.2s;
}

.bookmark-btn.bookmarked .icon {
    color: #fbbf24;
}

.bookmark-btn:active .icon {
    transform: scale(0.9);
}

/* Bookmarks Screen */
.bookmarks-container {
    padding: 60px 0 80px;
    height: 100vh;
    overflow-y: auto;
}

.bookmarks-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.bookmarks-header h2 {
    margin: 0;
    font-size: 20px;
    flex: 1;
}

.bookmark-count {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 600;
}

.bookmarks-videos {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.bookmark-video-item {
    aspect-ratio: 9/16;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.bookmark-video-item:hover {
    transform: scale(1.02);
}

.bookmark-video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bookmark-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 12px;
    font-size: 12px;
}

.bookmark-video-stats {
    display: flex;
    gap: 12px;
}

.bookmark-video-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bookmark-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.bookmark-video-item:hover .bookmark-remove-btn {
    opacity: 1;
}

.bookmark-remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Comments Section */
.comments-section {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    max-height: 60vh;
    background: var(--surface);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.comments-section.open {
    transform: translateY(0);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.comments-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-comments-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-comments-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.comment-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    margin-bottom: 4px;
    cursor: pointer;
}

.comment-username:hover {
    text-decoration: underline;
}

.comment-text {
    color: var(--text-primary);
    margin-bottom: 4px;
    word-wrap: break-word;
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-input-container {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--background);
}

.comment-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.send-comment-btn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 18px;
    flex-shrink: 0;
}

.send-comment-btn:active {
    transform: scale(0.9);
}

.send-comment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

@media (min-width: 768px) {
    .comments-section {
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        max-width: 500px;
    }

    .comments-section.open {
        transform: translateX(-50%) translateY(0);
    }
}

/* === SEARCH STYLES === */

.search-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

#search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-filters {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}

.filter-btn {
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.sort-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.search-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 15px;
}

.search-section {
    margin-bottom: 24px;
}

.search-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* User Items */
.search-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.2s;
}

.search-user-item:hover {
    background: var(--bg-hover);
}

.search-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.search-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.search-user-info {
    flex: 1;
    min-width: 0;
}

.search-user-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.search-user-displayname {
    color: var(--text-secondary);
    font-size: 14px;
}

.search-user-bio {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-follow-btn {
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    background: transparent;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.search-follow-btn.following {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Video Items */
.search-video-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.2s;
}

.search-video-item:hover {
    background: var(--bg-hover);
}

.search-video-thumbnail {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    overflow: hidden;
}

.search-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-video-info {
    flex: 1;
    min-width: 0;
}

.search-video-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-video-username {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.search-video-stats {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    gap: 12px;
}

/* Hashtag Items */
.search-hashtag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background 0.2s;
}

.search-hashtag-item:hover {
    background: var(--bg-hover);
}

.search-hashtag-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.search-hashtag-info {
    flex: 1;
}

.search-hashtag-tag {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.search-hashtag-count {
    color: var(--text-secondary);
    font-size: 13px;
}
/* PWA Install Button */
.pwa-install-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 70px;
        right: 10px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Follow List Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--surface);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.follow-list-content {
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.follow-list-container {
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    padding: 10px 0;
}

.follow-user-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    transition: background 0.2s;
    cursor: pointer;
}

.follow-user-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.follow-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.follow-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.follow-user-info {
    flex: 1;
    min-width: 0;
}

.follow-user-username {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-displayname {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-user-bio {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.follow-user-action {
    flex-shrink: 0;
}

.follow-user-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.follow-user-btn.follow {
    background: var(--primary);
    color: white;
}

.follow-user-btn.follow:hover {
    background: #5558e3;
}

.follow-user-btn.unfollow {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.follow-user-btn.unfollow:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-clickable {
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    padding: 4px;
    margin: -4px;
}

.stat-clickable:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Video Player Controls */
.speed-btn,
.pip-btn {
    position: absolute;
    top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    color: white;
}

.speed-btn {
    left: 74px; /* Next to volume button */
}

.pip-btn {
    left: 128px; /* Next to speed button */
    font-size: 18px;
}

.speed-btn:hover,
.pip-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.speed-btn:active,
.pip-btn:active {
    transform: scale(0.95);
}

/* Speed Menu */
.speed-menu {
    position: absolute;
    top: 74px;
    left: 74px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    padding: 8px;
    z-index: 11;
    display: none;
    animation: fadeIn 0.2s ease;
}

.speed-menu.show {
    display: block;
}

.speed-option {
    padding: 10px 20px;
    color: white;
    font-size: 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    text-align: center;
    min-width: 70px;
}

.speed-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.speed-option.active {
    background: var(--primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .speed-btn {
        left: 64px;
    }
    
    .pip-btn {
        left: 108px;
    }
    
    .speed-menu {
        left: 64px;
    }
}

/* Comment Improvements */
.comment-delete-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-left: auto;
}

.comment-delete-btn:hover {
    opacity: 1;
}

.comment-sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.comment-sort-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.comment-sort-select option {
    background: var(--surface);
    color: var(--text-primary);
}

/* Settings Screen */
.settings-container {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 80px;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 10;
}

.settings-header h2 {
    flex: 1;
    margin: 0;
    font-size: 20px;
}

.settings-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-info {
    flex: 1;
    padding-right: 20px;
}

.setting-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.settings-action-btn {
    width: 100%;
    padding: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-action-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}
