    /* =======================================
       Global Styles and Layout Management
       ======================================= */
    body {
        font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
        margin: 0;
        background-color: #f9f9f9; 
        color: #0f0f0f; 
        padding-top: 60px; /* Fixed Search Bar Height */
        padding-bottom: 56px; /* NEW: Padding for fixed bottom navigation bar */
    }
    #app-container {
        padding: 0;
    }

    /* -------------------- FIXED TOP BAR (Logo, Search, Icons) -------------------- */
    .fixed-search-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        padding: 10px 16px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
        z-index: 1000;
        display: flex;
        align-items: center;
        height: 60px;
        box-sizing: border-box;
        justify-content: space-between; 
        gap: 10px;
    }
    
    /* Logo/Menu Section */
    .fixed-search-bar .top-bar-left {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        cursor: pointer;
    }
    .fixed-search-bar .logo-brand {
        font-size: 20px;
        font-weight: 700;
        margin-right: 15px;
    }
    .fixed-search-bar .logo-vlab {
        color: black; 
    }
    .fixed-search-bar .logo-studio {
        color: #ff0000; 
    }

    /* Search Input Section */
    .search-container {
        position: relative;
        flex-grow: 1;
        display: flex;
        align-items: center;
        background-color: #f1f1f1; 
        border-radius: 25px;
        overflow: visible; /* CRITICAL: Must be visible for dropdown */
        border: none; 
        height: 40px;
        padding-right: 10px;
        max-width: 600px; 
    }
    .search-container .search-icon {
        padding: 0 15px;
        color: #606060;
        font-size: 18px;
    }
    .fixed-search-bar input[type="text"] {
        flex-grow: 1;
        padding: 10px 15px; 
        border: none;
        background-color: transparent;
        font-size: 16px;
        outline: none;
        color: #0f0f0f;
    }
    .clear-search {
        background: none;
        border: none;
        color: #606060;
        font-size: 18px;
        padding: 0 10px;
        cursor: pointer;
        outline: none;
        display: none;
    }
    
    /* Right Icons Section */
    .fixed-search-bar .top-bar-right {
        display: flex;
        gap: 15px;
        align-items: center;
        flex-shrink: 0;
    }
    .fixed-search-bar .right-icon {
        font-size: 20px;
        color: #0f0f0f;
        cursor: pointer;
    }
    .top-bar-right .mobile-search-trigger {
        display: none; 
    }
    /* NEW: Back button for mobile search */
    .fixed-search-bar .mobile-search-back {
        display: none;
        font-size: 24px;
        color: #0f0f0f;
        cursor: pointer;
        margin-right: 10px;
    }

    /* NEW: Notification Icon with Badge Styling */
    .notification-wrapper {
        position: relative;
        display: flex; 
        align-items: center;
        justify-content: center;
        padding: 0; 
    }
    .notification-badge {
        position: absolute;
        top: -5px;
        right: -10px;
        background-color: #ff0000;
        color: white;
        border-radius: 50%;
        padding: 1px 5px;
        font-size: 10px;
        font-weight: 500;
        line-height: 1;
        border: 2px solid #ffffff; 
    }

    /* NEW: Search History Dropdown Styles */
    .search-history-dropdown {
        position: absolute;
        top: 40px; /* Below the search input (which is 40px high) */
        left: 0;
        right: 0;
        width: 100%;
        background-color: #ffffff;
        border: 1px solid #ddd;
        border-top: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 990; /* Below fixed-search-bar but above content */
        max-height: 300px;
        overflow-y: auto;
        border-radius: 0 0 8px 8px;
        display: none; /* Initially hidden */
        box-sizing: border-box;
        padding: 0;
    }
    .history-item {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        cursor: pointer;
        transition: background-color 0.1s;
    }
    .history-item:hover {
        background-color: #f0f0f0;
    }
    .history-icon {
        color: #606060;
        margin-right: 10px;
        font-size: 16px;
    }
    .history-text {
        flex-grow: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .history-text b {
        font-weight: 700;
    }

    /* -------------------- DESKTOP TOP BAR ADJUSTMENTS -------------------- */
    @media (min-width: 651px) {
        .fixed-search-bar {
            justify-content: flex-start; 
        }
        .search-container {
            margin-left: auto; 
            margin-right: 20px;
        }
        /* Restore search icon inside desktop search bar */
        .search-container .search-icon {
            display: block !important; 
        }
        .fixed-search-bar input[type="text"] {
            padding: 10px 0;
        }
    }
    
    /* -------------------- MOBILE TOP BAR ADJUSTMENTS -------------------- */
    @media (max-width: 650px) {
        .fixed-search-bar {
            padding: 0 16px; 
        }
        .search-container {
            display: none; 
        }
        .fixed-search-bar .top-bar-left {
            margin-right: auto; 
        }
        .top-bar-right .mobile-search-trigger {
            display: block !important; 
            font-size: 22px;
            margin-right: 5px;
        }
        
        /* Mobile Search Active State */
        .fixed-search-bar.search-active {
            padding: 0 10px;
        }
        .fixed-search-bar.search-active .top-bar-left, 
        .fixed-search-bar.search-active .top-bar-right {
            display: none !important; 
        }
        .fixed-search-bar.search-active .mobile-search-back {
            display: block; 
        }
        .fixed-search-bar.search-active .search-container {
            display: flex; 
            flex-grow: 1;
            margin: 0;
            max-width: none;
            border-radius: 0;
            background-color: transparent;
        }
        .fixed-search-bar.search-active .search-container input[type="text"] {
            padding-left: 0; 
            background-color: #f1f1f1;
            border-radius: 25px;
            padding-right: 40px;
        }
        .fixed-search-bar.search-active .search-icon {
            display: none;
        }
        .fixed-search-bar.search-active .clear-search {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            padding: 0;
        }
        .fixed-search-bar.search-active .search-history-dropdown {
             top: 50px; /* Below the search bar which is slightly larger on mobile active */
             left: 0;
             right: 0;
             width: 100%;
             max-width: none;
             border-radius: 0 0 8px 8px;
        }
    }
    
    /* NEW: Hide original header content */
    .header-content {
        display: none; 
    }

    /* -------------------- BOTTOM NAVIGATION BAR -------------------- */
    .bottom-nav-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 56px; 
        background-color: #ffffff;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
        z-index: 1500; 
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #eee;
    }

    .bottom-nav-bar .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #606060; 
        font-size: 10px;
        padding: 5px 0;
        flex: 1;
        transition: color 0.2s;
    }

    .bottom-nav-bar .nav-item i {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .bottom-nav-bar .nav-item.active {
        color: #0f0f0f; 
        font-weight: 500;
    }

    /* Custom style for the 'Create/Upload' button */
    .bottom-nav-bar .create-btn {
        color: #0f0f0f;
        flex: 0.8; 
    }
    .bottom-nav-bar .create-btn i {
        font-size: 30px; 
        margin-bottom: 0;
    }
    .bottom-nav-bar .create-btn span {
        display: none;
    }

    /* REMOVED MEDIA QUERY: @media (min-width: 900px) { ... } 
       This makes the bottom-nav-bar universal for all devices. */
    
    /* -------------------- HOME PAGE (Gallery) Styles - CUSTOMIZED -------------------- */
    #home-view { display: block; }
    
    ul.youtubewall { margin: 0 auto; padding: 0 16px; list-style: none; width: 100%; max-width: 600px; box-sizing: border-box; }
    ul.youtubewall li { 
        width: 100%; 
        box-sizing: border-box; 
        padding: 0; 
        margin-bottom: 25px; 
        background-color: #ffffff; 
        border-radius: 12px; 
        box-shadow: 0 6px 15px rgba(0,0,0,0.1); 
        transition: transform 0.2s, box-shadow 0.2s;
        overflow: hidden; 
        cursor: pointer; 
        padding-bottom: 15px; 
    }
    ul.youtubewall li:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }
    
    ul.youtubewall li .thumbwrap { 
        position: relative; 
        padding-bottom: 56.25%; 
        height: 0; 
        overflow: hidden; 
    }
    ul.youtubewall li img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
    
    .thumb-info-overlay {
        position: absolute;
        bottom: 8px;
        right: 8px;
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 3px 6px;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 500;
        z-index: 10;
    }
    
    ul.youtubewall li .caption { 
        font-size: 1.05rem; 
        font-weight: 700; 
        color: #0f0f0f; 
        padding: 15px 15px 0 15px; 
        line-height: 1.4; 
        
        max-height: calc(1.05rem * 1.4 * 2); 
        
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical; 
        overflow: hidden; 
        text-overflow: ellipsis; 
        word-break: break-word; 
        white-space: normal;
    }

    /* -------------------- PLAYER VIEW Styles -------------------- */
    #player-view { 
        display: none; 
        background-color: #ffffff; 
        min-height: 100vh;
    }
    
    .player-back-icon { 
        position: absolute; 
        top: 75px; 
        left: 15px; 
        color: white; 
        font-size: 24px; 
        z-index: 950; 
        cursor: pointer; 
        display: block !important; 
    }
    
    .video-player-fixed { 
        width: 100%; 
        padding-bottom: 56.25%; 
        height: 0; 
        background-color: #000; 
        position: sticky; 
        top: 60px; 
        z-index: 900; 
        transition: all 0.3s ease-in-out; 
    }
    .video-player-fixed iframe { 
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        border: none; 
        border-radius: 0;
    }
    
    /* NEW: Custom Fullscreen Toggle Button */
    .fullscreen-toggle-btn {
        position: absolute;
        bottom: 8px; /* Standard control position */
        right: 8px;
        background: rgba(0,0,0,0.6);
        color: white;
        border: none;
        width: 30px; 
        height: 30px;
        border-radius: 4px;
        cursor: pointer;
        z-index: 910; /* Above the iframe but below the minimized controls */
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        transition: background-color 0.2s;
    }
    .fullscreen-toggle-btn:hover {
        background: rgba(0,0,0,0.8);
    }
    
    /* NEW: Minimized Player Styles */
    .video-player-fixed.minimized-player {
        position: fixed;
        bottom: 76px; 
        right: 20px;
        width: 250px; 
        padding-bottom: 140.625px; 
        height: 0;
        top: auto; 
        z-index: 1010; 
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        border-radius: 8px;
        overflow: hidden;
    }
    .video-player-fixed.minimized-player .fullscreen-toggle-btn {
        display: none; /* Hide when player is minimized */
    }
    
    .video-player-fixed.minimized-player + .player-metadata-section,
    .video-player-fixed.minimized-player + .player-metadata-section + .recommended-videos-section {
        display: none;
    }
    
    #player-view.player-is-minimized {
        min-height: 0;
        background-color: transparent;
        pointer-events: none;
    }
    #player-view.player-is-minimized .video-player-fixed.minimized-player {
        pointer-events: auto;
    }

    /* Control Buttons for Minimized Player */
    .player-controls-overlay {
        position: absolute;
        top: 0;
        right: 0;
        display: none; 
        z-index: 10;
        padding: 5px;
    }
    .minimized-player .player-controls-overlay {
        display: flex;
        gap: 5px;
        background: rgba(0,0,0,0.6);
        border-bottom-left-radius: 8px;
    }
    .player-controls-overlay button {
        background: none;
        border: none;
        color: white;
        font-size: 16px;
        cursor: pointer;
        padding: 0;
        height: 20px;
        width: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .player-metadata-section { 
        padding: 12px 16px; 
        border-bottom: 1px solid #e5e5e5; 
    }
    
    .player-video-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: #0f0f0f;
        margin-bottom: 8px;
        line-height: 1.4;
    }
    
    /* A. Channel Info Block (New Design) */
    .channel-info-block {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0; 
        margin-bottom: 12px;
    }
    .channel-left {
        display: flex;
        align-items: center;
    }
    .channel-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: block; 
        overflow: hidden; 
        margin-right: 12px;
        flex-shrink: 0;
    }
    .channel-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
    }
    .channel-text .channel-name {
        font-size: 1rem;
        font-weight: 600;
        color: #0f0f0f;
        line-height: 1.2;
    }

    .subscribe-button {
        background-color: black;
        color: white;
        border: none;
        padding: 8px 12px;
        border-radius: 20px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.2s;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    .subscribe-button:hover {
        background-color: #cc0000;
    }

    /* B. Action Buttons (Cleaned-up) */
    .player-action-buttons {
        display: flex;
        justify-content: flex-start;
        gap: 10px;
        margin-top: 10px;
        overflow-x: auto;
        padding-bottom: 5px; 
    }
    .player-action-buttons button {
        background-color: #e5e5e5;
        color: #0f0f0f;
        border: none;
        padding: 8px 15px;
        border-radius: 20px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0; 
    }
    .player-action-buttons button:hover {
        background-color: #dcdcdc;
    }
    .player-action-buttons button i {
        font-size: 16px;
    }
    

    /* -------------------- RECOMMENDED LIST Styles -------------------- */
    .recommended-videos-section {
        padding: 10px 0; 
    }
    .recommended-videos-section h2 {
        padding: 0 16px;
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 1.2rem;
        font-weight: 700;
    }
    ul.recommended-list { 
        list-style: none; 
        padding: 0 16px; 
        margin: 0 auto; 
        max-width: 600px; 
    }
    ul.recommended-list li {
        display: flex;
        margin-bottom: 12px; 
        cursor: pointer;
        align-items: flex-start;
        padding: 4px 0; 
        border-radius: 4px;
        transition: background-color 0.1s;
    }
    ul.recommended-list li:hover {
        background-color: #f0f0f0;
    }

    ul.recommended-list li .thumbwrap-sm {
        width: 140px; 
        min-width: 140px; 
        flex-shrink: 0;
        margin-right: 10px;
        position: relative; 
        padding-bottom: 78.75px; 
        height: 0; 
        overflow: hidden; 
        border-radius: 8px; 
    }
    ul.recommended-list li .thumbwrap-sm img {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block;
    }

    ul.recommended-list li .text-content-sm {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        padding-top: 2px; 
    }

    ul.recommended-list li .caption-sm {
        font-size: 0.95rem; 
        font-weight: 500;
        color: #0f0f0f;
        line-height: 1.3;
        
        /* Truncate to 2 lines */
        max-height: calc(0.95rem * 1.3 * 2); 
        display: -webkit-box;
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical; 
        overflow: hidden;
    }

    ul.recommended-list li .video-info-sm {
        font-size: 0.8rem; 
        color: #606060;
        margin-top: 4px;
        line-height: 1.2;
        display: flex;
        flex-direction: column; 
    }
    ul.recommended-list li .video-info-sm span:not(:last-child)::after {
        content: ' • ';
        display: none; 
    }

    /* =======================================
       RESPONSIVENESS IMPROVEMENTS (Media Queries)
       ======================================= */
    @media (min-width: 500px) { 
        ul.youtubewall { grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 700px; padding: 0 20px; }
        .video-player-fixed.minimized-player { width: 300px; padding-bottom: 168.75px; }
        
        /* Recommended list on wider screens */
        ul.recommended-list { max-width: 900px; padding: 0 20px; }
        ul.recommended-list li .video-info-sm {
            flex-direction: row; 
        }
        ul.recommended-list li .video-info-sm span:not(:last-child)::after {
            content: ' • ';
            display: inline;
        }
    }
    @media (min-width: 900px) { 
        ul.youtubewall { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; max-width: 1400px; padding: 0 30px; }
        .header-content, .player-metadata-section, .recommended-videos-section { max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: 30px; padding-right: 30px; }
        .player-back-icon { left: calc(50% - 700px + 30px); }
    }
    
        /* ####### MODAL & NOTIFICATION STYLES ####### */
.modal {
  display: none; 
  position: fixed; 
  z-index: 2000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.6); 
  backdrop-filter: blur(3px); 
}

.modal-content {
  background-color: #fefefe;
  margin: 10vh auto; 
  padding: 30px;
  border: 1px solid #888;
  width: 75%; 
  max-width: 500px; 
  border-radius: 10px;
  position: relative;
}

/* FIX: Original Close Button Style (Renamed to close-button-lg) */
.close-button-lg {
  color: #aaa;
  font-size: 50px;
  line-height: 1;
  font-weight: bold;
  transition: color 0.2s;
  position: absolute;
  top: 15px; 
  right: 25px; 
  text-decoration: none;
  cursor: pointer;
}

.close-button-lg:hover,
.close-button-lg:focus {
  color: #dc3545; 
  text-decoration: none;
  cursor: pointer;
}

/* FIX: Ensure H2 and P styles match the first image's appearance */
.modal-content h2 {
    text-align: center;
    color: #0d6efd; 
    margin-top: 0;
    margin-bottom: 10px; 
    border-bottom: none; 
    padding-bottom: 0;
    font-size: 28px; 
    font-weight: 800; 
}

.modal-content p {
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5; 
}


/* FIX: Form input layout to ensure stacking */
#videoSubmitForm label {
    display: block; 
    margin-top: 15px; 
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

#videoSubmitForm input[type="text"],
#videoSubmitForm input[type="email"],
#videoSubmitForm input[type="url"],
#videoSubmitForm textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; 
    font-size: 15px;
    transition: border-color 0.2s;
    display: block; 
}

#videoSubmitForm input:focus,
#videoSubmitForm textarea:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

#videoSubmitForm textarea {
    resize: vertical;
}

/* FIX: Submit button Styles - Made more Attractive */
.submit-btn {
    background-color: #0d6efd; 
    color: white;
    padding: 12px 25px; 
    border: none;
    border-radius: 50px; 
    cursor: pointer;
    width: 100%;
    font-size: 18px;
    font-weight: 700; 
    margin-top: 20px; 
    letter-spacing: 0.5px;
    
    /* NEW: Visual effects */
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4); 
    transition: all 0.3s cubic-bezier(.25,.8,.25,1); 
}

.submit-btn:hover {
    background-color: #0a58ca; 
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.6); 
    transform: translateY(-2px); 
}

.submit-btn:active {
    transform: translateY(0); 
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.4);
}


/* New Notification Modal Styling */
.notification-modal {
    display: none;
    position: fixed;
    top: 60px; 
    right: 0;
    width: 100%;
    max-width: 350px;
    height: auto;
    max-height: calc(100vh - 60px - 56px); 
    z-index: 1000; 
    overflow-y: auto;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 5px 5px;
    box-sizing: border-box;
    transform-origin: top right;
    animation: fadeInDown 0.3s ease-out;
}
@media (max-width: 650px) {
    .notification-modal {
        max-width: 100%;
    }
}

.notification-content {
    padding: 0;
}
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.notification-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
    transition: background-color 0.1s;
}
.notification-list li:hover {
    background-color: #f0f0f0;
}
.notification-list li p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
}
.notification-list li .date {
    display: block;
    font-size: 0.75rem;
    color: #909090;
    margin-top: 3px;
}
/* Small close button for notification modal */
.close-button-sm {
    color: #606060;
    font-size: 24px;
    line-height: 1;
    font-weight: normal;
    cursor: pointer;
}


/* ####### NEW MENU MODAL STYLES ####### */
.menu-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px; 
    height: 100%;
    background-color: #ffffff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 2100; 
    transform: translateX(100%); 
    transition: transform 0.3s ease-in-out;
    opacity: 0; 
    pointer-events: none; 
    overflow-y: auto;
}
.menu-modal.open {
    transform: translateX(0); 
    opacity: 1;
    pointer-events: auto; 
}
/* NEW: Fullscreen transparent overlay for 'click outside to close' */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2099; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
}
.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}


.menu-header {
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f0f0f;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* NEW: Style for the Menu Close Button */
.menu-close-button {
    font-size: 30px; 
    color: #606060;
    cursor: pointer;
    line-height: 1; 
    transition: color 0.2s;
}
.menu-close-button:hover {
    color: #0f0f0f;
}

.menu-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}
.menu-list li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #0f0f0f;
    font-size: 1rem;
    transition: background-color 0.1s;
}
.menu-list li a i {
    font-size: 18px;
    margin-right: 15px;
    color: #606060;
}
.menu-list li a:hover {
    background-color: #f0f0f0;
}

/* NEW: Submenu Styles */
.menu-dropdown .submenu-list {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f8f8f8; /* A slightly different background */
}
.menu-dropdown .submenu-list li a {
    padding-left: 55px; /* Indent submenu items */
}
.menu-dropdown a .submenu-arrow {
    float: right;
    margin-left: auto;
    transition: transform 0.2s ease-in-out;
}
.menu-dropdown.open a .submenu-arrow {
    transform: rotate(180deg);
}

.menu-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #909090;
    margin-top: 20px;
}


/* Tooltip Styles for the form */
.tooltip-wrapper {
    position: relative; 
    display: inline-block;
    cursor: pointer;
    margin-left: 5px; 
    color: #0d6efd; 
    z-index: 1000; 
}

/* NEW: Tooltip box for content - Replaces ::before/::after */
.tooltip-box {
    position: absolute;
    bottom: 110%; /* Position above icon */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    width: 200px; 
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 2001; /* Renders above modal */
    white-space: normal;
}
/* NEW: Tooltip Arrow (as pseudo-element of the tooltip-box) */
.tooltip-box::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Position below the box */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
/* NEW: Class to force visibility (JS Controlled) */
.tooltip-wrapper.show-tooltip .tooltip-box {
    opacity: 1;
    visibility: visible;
}

/* Keep :hover for desktop browsers as a fallback/desktop usability enhancement */
@media (min-width: 600px) {
    .tooltip-wrapper:hover .tooltip-box {
        opacity: 1;
        visibility: visible;
    }
    .tooltip-wrapper.show-tooltip .tooltip-box { /* Disable JS class on hover devices */
        opacity: 0;
        visibility: hidden;
    }
}

/* NEW: Share Modal (Android Native Style) */
.share-modal-bottom {
    background-color: transparent; 
    transition: background-color 0.3s ease-in-out;
    padding: 0;
    margin: 0;
}
.share-modal-bottom.open {
    background-color: rgba(0,0,0,0.6); 
}

.share-modal-content {
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    background-color: #ffffff; /* White background */
    position: absolute;
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%) translateY(100%); 
    border-radius: 20px 20px 0 0; /* More rounded top corners like native UI */
    padding: 0;
    transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.4, 0.9); /* Smoother slide in */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}
.share-modal-bottom.open .share-modal-content {
    transform: translateX(-50%) translateY(0); 
}

/* Grabber/Handle at the top */
.share-modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background-color: #ccc;
    border-radius: 2px;
    margin: 8px auto; 
}


.share-header {
    display: flex;
    align-items: center;
    padding: 5px 20px 10px; /* Adjusted padding */
    color: #0f0f0f;
}
.share-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500; /* Regular weight for a softer look */
}

/* Horizontal App List Section */
.share-app-list {
    display: flex;
    padding: 10px 15px;
    gap: 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #f0f0f0; /* Soft divider line */
}
/* Hide scrollbar for aesthetic purposes */
.share-app-list::-webkit-scrollbar { display: none; }
.share-app-list { -ms-overflow-style: none; scrollbar-width: none; }


.share-app-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #606060; /* Subdued text color */
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 80px; /* Fixed width for icon spacing */
    padding: 0 5px; 
}

.app-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff; /* Default background */
    box-shadow: 0 0 0 1px #f0f0f0; /* Subtle border */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    font-size: 24px;
    transition: opacity 0.1s;
}
.share-app-option:active .app-icon-wrapper {
    opacity: 0.8;
}

/* App-Specific Colors - FINAL YOUTUBE STYLE (using strong icon colors on a light background) */
.whatsapp .app-icon-wrapper i { color: #25D366; }
.gmail .app-icon-wrapper { box-shadow: 0 0 0 1px #f0f0f0; }
.gmail .app-icon-wrapper i { color: #EA4335; font-size: 28px; } /* Gmail red */
.messages .app-icon-wrapper i { color: #3B78E7; } /* Android Blue for Messages */
.telegram .app-icon-wrapper i { color: #0088CC; }
.facebook .app-icon-wrapper i { color: #1877F2; }
.bluetooth .app-icon-wrapper i { color: #0077c9; }
.more .app-icon-wrapper i { color: #606060; } 


/* Vertical Action List Section */
.share-action-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}
.share-action-option {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #0f0f0f;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.1s;
}
.share-action-option:hover {
    background-color: #f0f0f0;
}

.action-icon-wrapper {
    width: 38px; 
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e0e0e0; 
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #606060; 
    font-size: 18px; 
    flex-shrink: 0;
}
.share-action-option span {
    font-weight: 400; 
}


/* NOTE: Old .history-modal-content styles are removed as requested. 
   We are reusing existing list styles. 
   If you want the dedicated History List design from the previous step, re-add them!
   For now, we rely on standard home-view styles for a seamless integration.
*/