/* Extracted from gallery.php */

* { margin:0; padding:0; box-sizing:border-box; }
        body {
            margin:0;
            font-family:'Segoe UI',Tahoma,sans-serif;
            background:#222233;
            color:#eee;
            min-height:100vh;
            display:flex;
            flex-direction:column;
        }
        a { color:#77aaff; text-decoration:none; }
        a:hover { text-decoration:underline; }

        .navbar {
            background:#1a1a2e;
            padding:1rem 1.5rem;
            border-bottom:1px solid #333366;
            display:flex;
            justify-content:space-between;
            align-items:center;
            position:fixed;
            top:0;
            width:100%;
            z-index:1000;
        }
        .navbar-left {
            display:flex;
            align-items:center;
            gap:1.5rem;
        }
        .navbar-right {
            display:flex;
            align-items:center;
            gap:1rem;
        }
        .nav-link {
            color:#eee;
            font-size:1rem;
            padding:0.5rem 1rem;
            border-radius:6px;
            transition:background 0.2s;
            text-decoration:none !important;
        }
        .nav-link:hover { background:#333366; }
        .nav-link.active { background:#6677ff; color:white; }

        /* Hamburger for mobile */
        .hamburger {
            display:none;
            font-size:1.8rem;
            background:none;
            border:none;
            color:#eee;
            cursor:pointer;
        }

        /* Mobile menu */
        .mobile-menu {
            display:none;
            position:absolute;
            top:100%;
            left:0;
            width:100%;
            background:#1a1a2e;
            border-bottom:1px solid #333366;
            flex-direction:column;
            padding:1rem;
            box-shadow:0 8px 16px rgba(0,0,0,0.4);
        }
        .mobile-menu.open { display:flex; }
        .mobile-menu a {
            padding:0.8rem 1rem;
            color:#eee;
            text-decoration:none;
            border-radius:6px;
            transition:background 0.2s;
        }
        .mobile-menu a:hover { background:#333366; }

        .dropdown {
            position:relative;
            display:inline-block;
        }
        .dropbtn {
            background:none;
            border:none;
            color:#eee;
            font-size:1rem;
            padding:0.5rem 1rem;
            cursor:pointer;
        }
        .dropdown-content {
            display:none;
            position:absolute;
            right:0;
            background:#1a1a2e;
            min-width:160px;
            box-shadow:0 8px 16px rgba(0,0,0,0.4);
            border-radius:4px;
            z-index:1001;
            border:1px solid #333366;
        }
        .dropdown-content a {
            color:#eee;
            padding:12px 16px;
            display:block;
        }
        .dropdown-content a:hover { background:#333366; }
        .dropdown:hover .dropdown-content { display:block; }

        .main-content {
            flex:1;
            margin-top:70px;
            padding:1rem;
            display:flex;
            flex-direction:column;
            align-items:center;
        }

        .preview-container {
            width:100%;
            max-width:500px;
            background:#111122;
            border-radius:16px;
            overflow:hidden;
            margin-bottom:2rem;
            box-shadow:0 8px 32px rgba(0,0,0,0.5);
            display:flex;
            justify-content:center;
            align-items:center;
        }
        .preview-container img {
            max-width:100%;
            max-height:70vh;
            display:block;
            object-fit:contain;
            transition:transform 0.15s ease-out;
        }
        .no-preview {
            height:350px;
            display:flex;
            align-items:center;
            justify-content:center;
            color:#666;
            font-size:1.2rem;
        }

        .gallery-grid {
            display:grid;
            grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
            gap:1.2rem;
            width:100%;
            max-width:1400px;
        }

        /* Mobile adjustments */
        @media (max-width: 768px) {
            .navbar-links { display:none; }
            .hamburger { display:block; }
            .navbar-right { gap:0.8rem; }
            .preview-container { max-width:90vw; margin-bottom:1rem; }
            .preview-container img { max-height:55vh; }
            .gallery-grid { grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:0.9rem; }
        }

        .gallery-thumb {
            background:#222244;
            border-radius:12px;
            overflow:hidden;
            cursor:pointer;
            transition:transform 0.2s, box-shadow 0.2s;
            aspect-ratio:1/1;
        }
        .gallery-thumb:hover {
            transform:scale(1.06);
            box-shadow:0 8px 24px rgba(0,0,0,0.4);
        }
        .gallery-thumb img {
            width:100%;
            height:100%;
            object-fit:cover;
        }

        .error-message {
            text-align:center;
            padding:3rem;
            color:#ff5555;
            font-size:1.2rem;
        }

        /* Modal - same as watch/music */
        .modal {
            display:none;
            position:fixed;
            z-index:2000;
            left:0; top:0;
            width:100%; height:100%;
            background:rgba(0,0,0,0.7);
            align-items:center;
            justify-content:center;
        }
        .modal-content {
            background:#1a1a2e;
            padding:2rem;
            border-radius:8px;
            border:1px solid #333366;
            width:90%;
            max-width:520px;
            color:#eee;
            position:relative;
        }
        .close {
            position:absolute;
            right:1.5rem; top:1rem;
            color:#aaa;
            font-size:1.8rem;
            font-weight:bold;
            cursor:pointer;
        }
        .close:hover { color:#fff; }
        .modal h2 { color:#77aaff; margin-bottom:1.5rem; }
        .upload-section {
            margin:1.5rem 0;
            padding:1.2rem;
            background:#111122;
            border-radius:6px;
            border:1px solid #333366;
        }
        .upload-section h3 { margin-bottom:1rem; color:#77aaff; }
        .upload-section form { display:flex; flex-direction:column; gap:1rem; }
        .upload-section input[type="file"], .upload-section select {
            padding:0.6rem;
            background:#222244;
            border:1px solid #333366;
            color:#eee;
            border-radius:4px;
        }
        .upload-section button {
            background:#6677ff;
            color:white;
            border:none;
            padding:0.8rem;
            border-radius:6px;
            cursor:pointer;
        }
        .upload-section button:hover { background:#5555ff; }
        .progress-container-modal {
            height:6px;
            background:#333366;
            border-radius:3px;
            margin:0.6rem 0;
            overflow:hidden;
        }
        .progress-bar-modal {
            height:100%;
            background:#6677ff;
            width:0%;
            transition:width 0.2s;
        }
        .status-message {
            min-height:1.3rem;
            padding:0.6rem;
            border-radius:4px;
            font-size:0.95rem;
        }
        .status-message.success { background:#2a6633; color:#d4f4d4; }
        .status-message.error { background:#662a2a; color:#f4d4d4; }