*, *::before, *::after {
            box-sizing: border-box;
        }
        body {
            margin: 0;
            font-family: "Inter", "Segoe UI", sans-serif;
            background: #f8f6f0;
            color: rgb(23, 23, 22);
            line-height: 1.6;
        }
        
        @media (min-width: 769px) {
            body.has-sidebar {
                margin-left: 250px;
            }
        }
        
        .mobile-menu-toggle {
            display: inline-flex;
            width: 46px;
            height: 46px;
            border-radius: 10px;
            border: 1px solid #273449;
            background: #1f2937;
            color: #f8fafc;
            align-items: center;
            justify-content: center;
            padding: 0;
            cursor: pointer;
        }
        
        .mobile-menu-toggle .burger {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .mobile-menu-toggle .burger span {
            width: 20px;
            height: 2px;
            border-radius: 999px;
            background: currentColor;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }
        
        .sidebar-overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.7);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 90;
            display: none;
        }
        
        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s ease;
            }
            
            .sidebar.mobile-open {
                transform: translateX(0);
            }
            
            .sidebar-overlay {
                display: block;
            }
            
            .sidebar.mobile-open ~ .sidebar-overlay {
                opacity: 1;
                pointer-events: auto;
            }
        }
        header, main, footer {
            margin: 0 auto;
            width: 100%;
            padding: 0 1rem;
        }
        
        body:not(.has-sidebar) header,
        body:not(.has-sidebar) main,
        body:not(.has-sidebar) footer {
            max-width: 1000px;
        }
        header {
            padding-top: 1.75rem;
        }
        .site-header {
            position: relative;
        }
        .header-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }
        
        .user-menu {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .user-name {
            color: #cbd5f5;
            font-weight: 600;
        }
        
        .logout-btn {
            background: #be123c;
            color: #f8fafc;
            padding: 0.5rem 1rem;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            transition: background 0.2s ease;
        }
        
        .logout-btn:hover {
            background: #dc2626;
            color: #f8fafc;
        }
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: 250px;
            height: 100vh;
            background: #0f172a;
            border-right: 1px solid #1f2937;
            padding: 2rem 0;
            z-index: 100;
            overflow-y: auto;
        }
        
        .sidebar-nav {
            padding: 0 1rem;
        }
        
        .sidebar-nav ul {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .sidebar-nav a {
            display: block;
            padding: 0.75rem 1rem;
            color: #e0f2fe;
            font-weight: 600;
            text-decoration: none;
            border-radius: 8px;
            transition: background 0.2s ease, color 0.2s ease;
        }
        
        .sidebar-nav a:hover,
        .sidebar-nav a:focus {
            background: #1f2937;
            color: #38bdf8;
        }
        
        .menu-separator {
            border-top: 1px solid #374151;
            margin: 0.75rem 1rem;
            padding: 0;
        }
        main {
            margin-top: 2rem;
            margin-bottom: 3rem;
        }
        footer {
            padding-bottom: 2.5rem;
            text-align: center;
            color: #cbd5f5;
            font-size: 0.9rem;
        }
        h1, h2, h3, h4 {
            color: rgb(23, 23, 22);
            margin-top: 0;
        }
        a {
            color: #38bdf8;
            text-decoration: none;
        }
        a:hover,
        a:focus {
            color: #0ea5e9;
        }
        @media (min-width: 769px) {
            header, main, footer {
                padding: 0 1.5rem;
            }
            header {
                padding-top: 2.5rem;
            }
            .card {
                padding: 1.75rem;
            }
            .album-select-row {
                flex-direction: row;
            }
        }
        @media (min-width: 992px) {
            .media-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }
        @media (min-width: 1200px) {
            header, main, footer {
                padding: 0 2rem;
            }
            .media-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }
        .card {
            background: #FFFFFF;
            border: 1px solid #CCCCCC;
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 3px rgba(255,255,255, 0.2);
        }
        .grid {
            display: grid;
            gap: 1rem;
        }
        .grid.two {
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        }
        .album-select-group {
            display: grid;
            gap: 0.75rem;
        }
        .album-select-label {
            font-weight: 600;
        }
        .album-select-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            align-items: stretch;
            flex-direction: column;
        }
        .album-select-row select {
            flex: 1;
            min-width: 200px;
        }
        .album-create-panel {
            border: 1px dashed #273449;
            border-radius: 12px;
            padding: 1rem;
            background: #0f172a;
        }
        .album-create-panel.is-hidden {
            display: none;
        }
        .album-select-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            align-items: center;
        }
        .album-create-panel label {
            margin-bottom: 0.5rem;
        }
        .form-hint {
            font-size: 0.9rem;
            color: #94a3b8;
            margin: 0;
        }
        .form-hint.is-error {
            color: #fda4af;
        }
        .album-item {
            gap: 0.85rem;
        }
        .album-cover-link {
            display: block;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #273449;
            background: #0f172a;
            transition: transform 0.2s ease, border-color 0.2s ease;
        }
        .album-cover-link:hover,
        .album-cover-link:focus-visible {
            border-color: #38bdf8;
            transform: translateY(-2px);
        }
        .album-cover {
            width: 100%;
            aspect-ratio: 4 / 3;
            background: radial-gradient(circle at top, #1d2a44, #0b1120);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .album-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .album-cover-placeholder {
            text-align: center;
            color: #94a3b8;
            font-size: 0.95rem;
            padding: 1rem;
        }
        .album-cover-placeholder span {
            display: block;
            font-size: 2rem;
            margin-bottom: 0.35rem;
        }
        .album-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem 1rem;
            font-size: 0.9rem;
            color: #94a3b8;
        }
        .album-view-link {
            font-weight: 600;
            color: #38bdf8;
        }
        .album-view-link:hover,
        .album-view-link:focus {
            color: #0ea5e9;
        }
        form {
            display: grid;
            gap: 1rem;
        }
        label {
            display: grid;
            gap: 0.35rem;
            font-weight: 600;
        }
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="number"],
        input[type="file"],
        select,
        textarea {
    
            border: 1px solid #CCCCCC;
            border-radius: 10px;
            padding: 0.75rem 0.85rem;
            font-size: 1rem;
            width: 100%;
        }
        input[type="file"] {
            padding: 0.5rem 0.85rem;
        }
        .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .dropzone {
            border: 2px dashed #38bdf8;
            border-radius: 12px;
            padding: 2.25rem 1.5rem;
            text-align: center;
            background: #FFFFFF;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
        }
        .dropzone strong {
            display: block;
            font-size: 1.05rem;
            margin-bottom: 0.25rem;
            color: #e0f2fe;
        }
        .dropzone small {
            display: block;
            color: #94a3b8;
        }
        .dropzone.dragover {
            border-color: #0ea5e9;
            background: #0b1b33;
        }
        .dropzone-feedback {
            margin-top: 0.6rem;
            color: #cbd5f5;
            font-size: 0.9rem;
        }
        .dropzone-feedback:empty {
            display: none;
        }
        .form-error {
            margin-top: 0.6rem;
            color: #fda4af;
            font-size: 0.9rem;
        }
        .form-error:empty {
            display: none;
        }
        .desktop-only {
            display: block;
        }
        .mobile-only {
            display: none;
        }
        .is-mobile .desktop-only {
            display: none !important;
        }
        .is-mobile .mobile-only {
            display: block !important;
        }
        .is-desktop .desktop-only {
            display: block !important;
        }
        .is-desktop .mobile-only {
            display: none !important;
        }
        .upload-progress {
            display: grid;
            gap: 0.5rem;
            margin-top: 1rem;
        }
        .upload-progress .status {
            font-size: 0.9rem;
            color: #cbd5f5;
        }
        .upload-progress progress {
            width: 100%;
            height: 14px;
        }
        .upload-progress.is-hidden {
            display: none;
        }
        .selection-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        .selection-toolbar .selection-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .selectable-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 0.75rem;
            grid-template-columns: 1fr 1fr;
        }
        @media screen and (min-width: 768px) {
            .selectable-list {
                grid-template-columns: 1fr 1fr 1fr;
            }
        }
        @media screen and (min-width: 992px) {
            .selectable-list {
                grid-template-columns: 1fr 1fr 1fr 1fr;
            }
        }
        .selectable-item {
            position: relative;
            display: grid;
            gap: 0.35rem;
            padding: 0.85rem;
            border: 1px solid #CCCCCC;
            border-radius: 12px;
            background: #FFFFFF;
            transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
            cursor: pointer;
        }
        .selectable-item:hover {
            border-color: #334155;
        }
        .selectable-item.selected {
            border-color: #38bdf8;
            background: #0b162d;
        }
        .selectable-item input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }
        .selection-checkbox {
            width: 22px;
            height: 22px;
            border-radius: 0;
            border: 2px solid #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 0.75rem;
            transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
        }
        .selectable-item.selected .selection-checkbox {
            border-color: #38bdf8;
            background: #38bdf8;
            color: #0b1120;
        }
        .selection-checkbox::before {
            content: '';
            width: 10px;
            height: 10px;
            border-radius: 0;
            background: currentColor;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .selectable-item.selected .selection-checkbox::before {
            opacity: 1;
        }
        .selectable-item .item-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .selectable-item .item-content {
            display: grid;
            gap: 0.25rem;
            flex: 1;
        }
        .selectable-item .item-content .item-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
        }
        .selectable-item .item-content .meta {
            font-size: 0.85rem;
            color: #94a3b8;
        }
        .selectable-item .item-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .media-grid.selectable-grid {
            position: relative;
        }
        .media-item.selectable {
            position: relative;
            padding-top: 2.75rem;
            cursor: pointer;
            transition: border-color 0.2s ease, transform 0.2s ease;
        }
        .media-item.selectable:hover {
            border-color: #334155;
        }
        .media-item.selectable.selected {
            border-color: #38bdf8;
            background: #0b162d;
        }
        .media-item .select-checkbox {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            opacity: 0;
            pointer-events: none;
        }
        .media-item .select-indicator {
            position: absolute;
            top: 0.6rem;
            right: 0.6rem;
            width: 26px;
            height: 26px;
            border-radius: 8px;
            background: rgba(15, 23, 42, 0.85);
            border: 2px solid #334155;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
        }
        .media-item.selected .select-indicator {
            background: #38bdf8;
            border-color: #38bdf8;
            color: #0b1120;
        }
        .media-item .select-indicator::before {
            content: '';
            width: 12px;
            height: 12px;
            border-radius: 3px;
            background: currentColor;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .media-item.selected .select-indicator::before {
            opacity: 1;
        }
        .media-item .item-footer {
            margin-top: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
        }
        .media-item .item-footer .meta {
            display: grid;
            gap: 0.15rem;
            font-size: 0.85rem;
            color: #cbd5f5;
        }
        .link-button {
            background: none;
            border: none;
            color: #38bdf8;
            font-size: 0.9rem;
            padding: 0;
            cursor: pointer;
        }
        .link-button:hover {
            color: #0ea5e9;
        }
        .link-button.danger {
            color: #fda4af;
        }
        .link-button.danger:hover {
            color: #f87171;
        }
        input:focus,
        select:focus,
        textarea:focus {
            outline: 2px solid #38bdf8;
            outline-offset: 2px;
        }
        button,
        a[role="button"] {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: none;
            border-radius: 999px;
            padding: 0.75rem 1.5rem;
            background: #38bdf8;
            color: #0b1120;
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            transition: background 0.2s ease;
        }
        button.secondary,
        a.secondary[role="button"] {
            background: #1f2937;
            color: #f1f5f9;
        }
        button.danger,
        a.danger[role="button"] {
            background: #be123c;
            color: #f8fafc;
        }
        button:hover,
        a[role="button"]:hover {
            background: #0ea5e9;
        }
        button.secondary:hover,
        a.secondary[role="button"]:hover {
            background: #334155;
        }
        button.danger:hover,
        a.danger[role="button"]:hover {
            background: #dc2626;
        }
        button:disabled,
        a[role="button"][aria-disabled="true"] {
            opacity: 0.6;
            cursor: not-allowed;
        }
        .media-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
        }
        .media-item {
            background: #FFFFFF;
            border: 1px solid #CCCCCC;
            border-radius: 10px;
            padding: 0.75rem;
            text-align: center;
        }
        .media-item img,
        .media-item video {
            max-width: 100%;
            border-radius: 8px;
        }
        mark,
        [role="alert"] {
            background: #be123c;
            color: #f8fafc;
            border-radius: 6px;
            padding: 0.5rem 0.75rem;
            display: inline-block;
        }
        .badge {
            display: inline-block;
            padding: 0.15rem 0.65rem;
            border-radius: 999px;
            font-size: 0.8rem;
            background: #0ea5e9;
            color: #0b1120;
            font-weight: 600;
        }
        progress {
            width: 100%;
            height: 12px;
            border-radius: 999px;
            overflow: hidden;
            background: #1f2937;
            border: none;
        }
        progress::-webkit-progress-bar {
            background: #1f2937;
        }
        progress::-webkit-progress-value {
            background: #38bdf8;
        }
        progress::-moz-progress-bar {
            background: #38bdf8;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1rem;
        }
        th, td {
            border: 1px solid #1f2937;
            padding: 0.75rem;
            text-align: left;
        }
        th {
            background: #1e293b;
            color: #f8fafc;
        }
        tr:nth-child(even) td {
            background: #111c2f;
        }
        
        .page-header {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .add-album-btn {
            align-self: flex-start;
            white-space: nowrap;
        }
        
        @media (min-width: 768px) {
            .page-header {
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 0;
            }
        }
        
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(2, 6, 23, 0.8);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .modal-content {
            background: #111827;
            border: 1px solid #1f2937;
            border-radius: 12px;
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            transform: scale(0.9) translateY(20px);
            transition: transform 0.3s ease;
        }
        
        .modal-overlay.active .modal-content {
            transform: scale(1) translateY(0);
        }
        
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem 1.5rem 0 1.5rem;
            border-bottom: 1px solid #1f2937;
            margin-bottom: 1.5rem;
        }
        
        .modal-header h3 {
            margin: 0;
            color: #f1f5f9;
        }
        
        .modal-close {
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.25rem;
            line-height: 1;
            transition: color 0.2s ease;
        }
        
        .modal-close:hover {
            color: #f8fafc;
        }
        
        .modal-body {
            padding: 0 1.5rem 1.5rem 1.5rem;
        }
        
        .modal-form {
            display: grid;
            gap: 1rem;
        }
        
        .modal-actions {
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
            margin-top: 1.5rem;
        }
        
        .modal-actions button {
            padding: 0.65rem 1.25rem;
        }
        
        .share-success {
            padding: 1rem;
            border: 1px solid #059669;
            background: #064e3b;
            border-radius: 8px;
            margin-bottom: 1rem;
        }
        
        .share-success p {
            margin: 0 0 0.75rem 0;
            color: #6ee7b7;
        }
        
        .share-link-container {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        
        .share-link-input {
            flex: 1;
            font-family: monospace;
            font-size: 0.9rem;
            background: #1f2937;
            border: 1px solid #374151;
            padding: 0.5rem;
            border-radius: 6px;
            color: #e5e7eb;
        }
        
        .share-info {
            margin: 0;
        }
        
        .share-info small {
            color: #9ca3af;
        }
        
        .share-loading {
            text-align: center;
            padding: 2rem;
            color: #9ca3af;
        }
        
        .form-hint {
            font-size: 0.85rem;
            color: #9ca3af;
            margin-top: 0.25rem;
            display: block;
        }
        
        .item-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        
        @media (max-width: 768px) {
            .item-actions {
                flex-direction: column;
                align-items: stretch;
                gap: 0.5rem;
            }
            
            .item-actions .link-button {
                text-align: center;
                padding: 0.5rem;
            }
        }
        
        .albums-header {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .albums-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            align-items: center;
        }
        
        .view-mode-selector,
        .sort-selector {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .view-mode-selector label,
        .sort-selector label {
            font-size: 0.9rem;
            color: #cbd5f5;
            white-space: nowrap;
        }
        
        .view-mode-selector select,
        .sort-selector select {
            min-width: 120px;
            font-size: 0.9rem;
        }
        
        .albums-container.list-mode {
            display: block;
        }
        
        .albums-container.list-mode .album-item {
            display: flex;
            align-items: center;
            padding: 1rem;
            margin-bottom: 0.75rem;
            border: 1px solid #1f2937;
            border-radius: 12px;
            background: #0f172a;
            transition: border-color 0.2s ease, background 0.2s ease;
        }
        
        .albums-container.list-mode .album-item:hover {
            border-color: #334155;
        }
        
        .albums-container.list-mode .album-item.selected {
            border-color: #38bdf8;
            background: #0b162d;
        }
        
        .albums-container.list-mode .album-cover-link {
            width: 80px;
            height: 60px;
            margin-right: 1rem;
            flex-shrink: 0;
        }
        
        .albums-container.list-mode .album-cover {
            width: 100%;
            height: 100%;
            border-radius: 6px;
        }
        
        .albums-container.list-mode .item-row {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .albums-container.list-mode .item-content {
            flex: 1;
        }
        
        .albums-container.list-mode .item-title {
            margin-bottom: 0.25rem;
        }
        
        .albums-container.list-mode .album-meta {
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        .albums-container.list-mode .album-view-link {
            display: none;
        }
        
        .albums-container.list-mode .selection-checkbox {
            margin-right: 1rem;
        }
        
        @media (min-width: 768px) {
            .albums-header {
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
            }
            
            .albums-controls {
                flex-shrink: 0;
            }
        }
        
        .album-detail-header {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .album-breadcrumb {
            margin-bottom: 0.5rem;
        }
        
        .breadcrumb-link {
            color: #38bdf8;
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s ease;
        }
        
        .breadcrumb-link:hover {
            color: #0ea5e9;
        }
        
        .album-info h2 {
            margin-bottom: 0.5rem;
        }
        
        .album-description {
            color: #cbd5f5;
            margin-bottom: 1rem;
        }
        
        .album-meta-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .media-count {
            color: #94a3b8;
            font-weight: 600;
        }
        
        .album-actions {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        
        .share-album-btn {
            white-space: nowrap;
        }
        
        .share-info-panel {
            background: #0f172a;
            border: 1px solid #1f2937;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
        }
        
        .share-info-panel h4 {
            margin-top: 0;
            margin-bottom: 0.75rem;
            color: #6ee7b7;
        }
        
        .empty-state {
            text-align: center;
            padding: 3rem 1rem;
            color: #94a3b8;
        }
        
        .empty-state p {
            margin-bottom: 1rem;
            font-size: 1.1rem;
        }
        
        @media (min-width: 768px) {
            .album-detail-header {
                flex-direction: row;
                justify-content: space-between;
                align-items: flex-start;
            }
            
            .album-info {
                flex: 1;
                margin-right: 2rem;
            }
            
            .album-actions {
                flex-shrink: 0;
                align-items: flex-start;
            }
        }
