        /* Basic Setup & Layout */
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html, body {
            height: 100%;
            width: 100%;
            font-family: 'Reddit Sans', sans-serif;
            background-color: #ffffff; /* Changed to white */
            color: #000000; /* Changed to black */
            overflow: hidden; /* Prevents scrolling on larger screens */
        }

        /* Header and Navigation */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 40px;
            position: fixed;
            width: 100%;
            top: 0;
            left: 0;
            z-index: 100;
            background-color: #ffffff; /* Added white background */
            box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Added subtle shadow */
            height: 85px;
        }
        
        .header-link {
            text-decoration: none;
            color: inherit;
        }

        .title-container {
            display: flex;
            flex-direction: column;
        }

        .title {
            font-family: 'DM Serif Text', serif;
            font-size: 2.5rem;
            color: #000000; /* Changed to black */
        }
        
        .tagline {
            font-family: 'Oswald', sans-serif; /* Changed font */
            font-size: 0.7rem; /* Made smaller */
            color: #555555;
            margin-top: -2px;
            letter-spacing: 1px; /* Adjusted spacing for new font */
            font-weight: 600; /* Thicker weight */
        }

        nav {
            display: flex;
            gap: 25px;
            align-items: center;
        }
        
        /* General Nav Button Style */
        .nav-button {
            background: none;
            border: none; /* Borders removed */
            color: #888888; /* Gray text */
            padding: 10px 0;
            font-family: 'Reddit Sans', sans-serif;
            font-weight: bold;
            font-size: 0.9rem;
            cursor: pointer;
            transition: color 0.2s ease-in-out;
        }

        .nav-button:hover {
            color: #000000;
        }

        #admin-panel-btn {
            color: #c84848;
            font-weight: 900;
        }
        
        #hamburger-btn {
            display: none; /* Hidden by default on desktop */
            background-color: #000000;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            justify-content: center;
            align-items: center;
            padding: 0;
            line-height: 0;
        }

        #hamburger-btn svg {
            stroke: white;
        }

        .nav-links-wrapper {
            display: flex;
            gap: 25px;
            align-items: center;
        }

        /* Specific style for +ADD button */
        #add-btn {
            background-color: #000000;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.8rem;
            font-weight: 300;
            padding: 0;
            line-height: 0;
            transition: transform 0.2s ease-in-out;
        }

        #add-btn:hover {
            transform: scale(1.1);
            color: white;
        }
        
        /* Search Bar */
        .search-container {
            position: fixed;
            top: 85px; /* Height of header */
            left: 0;
            width: 100%;
            padding: 10px 40px;
            background-color: #ffffff;
            z-index: 99;
            border-bottom: 1px solid #eee;
        }

        #search-bar {
            width: 100%;
            padding: 12px 40px 12px 15px; /* Added right padding for icon */
            font-size: 1rem;
            border-radius: 8px;
            border: 1px solid #ddd;
            outline: none;
        }
        #search-bar:focus {
            border-color: #000;
            box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
        }

        .search-icon {
            position: absolute;
            right: 55px; /* Adjust as needed */
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            stroke: #aaa;
            pointer-events: none; /* Prevents icon from blocking clicks */
        }

        /* 'Think' Grid */
        main {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
            padding: 165px 40px 40px 40px; /* Adjusted top padding for header AND search bar */
            height: 100%;
            overflow-y: auto; /* Allow scrolling only if content overflows */
        }

        /* Individual 'Think' Block */
        .think-block {
            color: #222; /* Changed text color for light backgrounds */
            padding: 25px;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Added subtle drop shadow */
            position: relative; /* For positioning admin delete button */
        }
        
        .super-think {
            border: 2px solid #c84848;
            box-shadow: 0 6px 20px rgba(200, 72, 72, 0.2);
        }

        .ad-banner {
            padding: 0;
            overflow: hidden;
        }
        .ad-banner a {
            display: block;
            width: 100%;
            height: 100%;
        }
        .ad-banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }


        .think-block h3 {
            font-size: 1.6rem;
            margin-bottom: 8px; /* Reduced space */
            font-weight: 700;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2; /* Limit to 2 lines */
        }

        .think-block p {
            font-size: 1.1rem; /* Increased font size */
            line-height: 1.5;
            flex-grow: 1; 
        }

        .read-more {
            cursor: pointer;
            font-weight: bold;
            text-decoration: underline;
        }

        /* Tags Styling */
        .tags-section {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin-top: 10px;
            margin-bottom: 15px;
        }

        .tags-section svg {
            flex-shrink: 0;
            margin-top: 4px;
        }

        .tags-container {
            display: flex;
            flex-wrap: nowrap; /* Changed from wrap */
            gap: 6px;
            overflow: hidden; /* Hide overflowing tags */
        }

        .tag {
            background-color: rgba(0, 0, 0, 0.05);
            color: #333;
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer; /* Make tags look clickable */
            transition: background-color 0.2s ease-in-out;
        }

        .tag:hover {
            background-color: rgba(0, 0, 0, 0.1);
        }

        .think-block .think-meta {
            margin-top: 20px;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px; /* Space between avatar and name/url group */
        }

        .user-meta-line {
            display: flex;
            align-items: center;
            gap: 5px; /* Tightened space around the separator */
            flex-wrap: wrap; /* Allow URL to wrap if too long */
        }

        .separator {
            opacity: 0.7;
            font-weight: 300;
        }

        .profile-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            overflow: hidden; /* For the image */
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #eee; /* Fallback for broken images or letter bg */
            color: white;
            font-weight: bold;
            font-size: 0.9rem;
            flex-shrink: 0; /* Prevents shrinking in flex container */
        }

        .profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .think-block .think-user {
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            opacity: 0.9;
            cursor: pointer;
            transition: opacity 0.2s ease-in-out;
        }

        .think-block .think-user:hover {
            opacity: 1;
        }
        
        .think-block a {
            color: #555; /* Changed for light backgrounds */
            text-decoration: none; /* Underline removed */
            font-size: 0.8rem;
            word-break: break-all;
            opacity: 0.8;
            /* padding-left removed */
        }
        
        .think-actions {
            display: flex;
            gap: 20px; /* Space between like/dislike groups */
            margin-top: 15px; /* Tightened vertical space */
            align-items: center;
        }
        
        .action-group {
            display: flex;
            align-items: center;
            gap: 6px; /* Space between icon and number */
        }

        .think-actions button {
            background: none;
            border: none;
            color: #222; /* Changed for light backgrounds */
            cursor: pointer;
            padding: 0;
            display: flex;
            align-items: center;
        }
        
        .think-actions svg {
            width: 20px;
            height: 20px;
            stroke: #222; /* Changed for light backgrounds */
            stroke-width: 2;
        }

        /* Share Modal */
        .share-modal {
            position: absolute;
            background-color: #ffffff;
            border: 1px solid #eee;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            z-index: 1001;
            display: none;
            flex-direction: column;
            overflow: hidden;
            width: 200px;
        }

        .share-modal.show {
            display: flex;
        }

        .share-link {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 15px;
            text-decoration: none;
            color: #333;
            font-size: 0.9rem;
            background: none;
            border: none;
            width: 100%;
            text-align: left;
            cursor: pointer;
        }

        .share-link:hover {
            background-color: #f5f5f5;
        }

        .share-link svg {
            width: 20px;
            height: 20px;
            fill: #555;
        }


        /* Responsive Navigation */
        @media screen and (max-width: 992px) {
            header {
                padding: 15px 20px;
            }

            nav {
                gap: 15px;
            }
            
            .nav-links-wrapper {
                display: none; /* Hide the text links */
                position: absolute;
                top: 75px; /* Position it below the header */
                right: 20px;
                background-color: #ffffff;
                border-radius: 8px;
                box-shadow: 0 5px 15px rgba(0,0,0,0.1);
                border: 1px solid #eee;
                flex-direction: column;
                padding: 8px;
                align-items: flex-start;
                z-index: 1000;
            }

            .nav-links-wrapper.show-menu {
                display: flex; /* Show the dropdown menu */
            }

            .nav-links-wrapper .nav-button {
                width: 100%;
                padding: 10px 15px;
                text-align: left;
            }

            #hamburger-btn {
                display: flex; /* Show the hamburger button */
            }
        }


        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 200;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }
        
        .modal-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background-color: #333;
            color: white;
            padding: 30px;
            border-radius: 10px;
            width: 90%;
            max-width: 500px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            position: relative;
        }

        #admin-panel-modal .modal-content {
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
        }


        .modal-content h2, #read-more-modal h3 {
            font-family: 'DM Serif Text', serif;
        }
        
        #read-more-modal h3 {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        #read-more-modal .modal-content {
             background-color: #2a2a2a;
        }

        /* Increased visibility for tags within the modal */
        #read-more-modal .tag {
            background-color: #555;
            color: #fff;
        }

        #read-more-modal .tag:hover {
            background-color: #777;
        }

        #read-more-modal p {
            line-height: 1.6;
            white-space: pre-wrap; /* Preserves line breaks from textarea */
        }

        .modal-content input, .modal-content textarea, .modal-content select {
            width: 100%;
            padding: 12px;
            border-radius: 5px;
            border: 1px solid #555;
            background-color: #222;
            color: white;
            font-family: 'Reddit Sans', sans-serif;
            font-size: 1rem;
        }

        #post-btn, #login-submit-btn, #register-submit-btn, #forgot-password-submit-btn, .admin-btn {
            padding: 12px;
            background-color: #ffffff;
            color: #000000;
            border: 1px solid transparent;
            border-radius: 5px;
            font-weight: bold;
            cursor: pointer;
            margin-top: 10px;
            transition: background-color 0.2s, color 0.2s, opacity 0.2s;
        }

        #post-btn:hover, 
        #login-submit-btn:hover, 
        #register-submit-btn:hover:not(:disabled), 
        #forgot-password-submit-btn:hover, 
        .admin-btn:hover:not(.danger) {
            background-color: #000000;
            color: #ffffff;
        }

        .admin-btn.danger {
            background-color: #ffffff;
            color: #c84848;
            border: 1px solid #c84848;
        }
        
        .admin-btn.danger:hover {
            background-color: #c84848;
            color: #ffffff;
        }

        #register-submit-btn:disabled {
            background-color: #555;
            color: #aaa;
            border-color: #555;
            opacity: 0.6;
            cursor: not-allowed;
        }

        #register-submit-btn:disabled:hover {
            background-color: #555;
            color: #aaa;
        }
        
        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 2.2rem;
            font-weight: 300;
            cursor: pointer;
            color: #aaa;
            line-height: 1;
        }
        .close-btn:hover {
            color: white;
        }

        /* Sidebar for 'My Thinks' */
        .sidebar {
            height: 100%;
            width: 0;
            position: fixed;
            z-index: 300;
            top: 0;
            right: 0;
            background-color: #111;
            overflow-x: hidden;
            transition: 0.5s;
            padding-top: 60px;
        }

        .sidebar h2 {
            padding: 0 25px;
            color: white;
            font-family: 'DM Serif Text', serif;
            margin-bottom: 1rem;
        }

        .sidebar p {
            padding: 0 25px;
            color: #ccc;
        }

        .sidebar a {
            padding: 8px 8px 8px 32px;
            text-decoration: none;
            font-size: 1rem;
            color: #818181;
            display: block;
            transition: 0.3s;
        }

        .sidebar a:hover {
            color: #f1f1f1;
        }

        .sidebar .close-sidebar-btn {
            position: absolute;
            top: 15px;
            right: 25px;
            font-size: 36px;
            margin-left: 50px;
        }

        #sidebar-content {
            padding: 20px;
        }

        .terms-agreement {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 5px;
            font-size: 0.8rem;
            color: #ccc;
            justify-content: flex-start; /* Aligns items to the left */
        }

        .terms-agreement a {
            color: #fff;
            text-decoration: underline;
            cursor: pointer;
        }

        #terms-modal .modal-content, #admin-panel-modal .modal-content {
            gap: 10px;
        }
        
        #terms-modal h2, #admin-panel-modal h3 {
            margin-bottom: 10px;
        }

        #terms-modal p, #terms-modal li, #admin-panel-modal p, #admin-panel-modal label {
            font-size: 0.9rem;
            line-height: 1.6;
            color: #ddd;
        }

        #terms-modal ul {
            padding-left: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .admin-section {
            border-top: 1px solid #555;
            padding-top: 20px;
            margin-top: 20px;
        }

        .flagged-item, .ad-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #444;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 8px;
        }

        .flagged-item p, .ad-item p {
            margin: 0;
            color: #fff;
        }
        .flagged-item span {
            font-style: italic;
            color: #ccc;
            font-size: 0.8rem;
            max-width: 60%;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Admin-only buttons on think blocks */
        .delete-btn-admin {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #c84848;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            cursor: pointer;
            font-weight: bold;
            display: flex;
            justify-content: center;
            align-items: center;
            line-height: 1;
            font-size: 1rem;
        }
        .flag-btn {
            margin-left: auto; /* Pushes it to the right */
        }
 