@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}


.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    
    border-bottom: 0 !important;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}

.topbar-inner {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -48px;
    height: 48px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0.6) 25%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.1) 75%,
        rgba(255,255,255,0) 100%
    );
    pointer-events: none;
}


.top-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, white 0, transparent 100%);
    pointer-events: none;
    z-index: 19;
}


.header-blur,
.footer-blur,
.gradient-overlay,
.touch-blocker {
    pointer-events: none;    
}


.modal[data-open] {
    z-index: 1000;
}


.modal[hidden],
#addModal[hidden],
#settingsModal[hidden] {
    display: none !important;
}


button, .btn {
    -webkit-tap-highlight-color: transparent;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}





.logo {
    height: 24px;
    width: auto;
    display: block;
}

.version-badge {
    font-size: 10px;
    color: #666;
    margin-left: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    gap: 24px;
    align-items: center;
}

.settings-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.settings-btn:hover {
    opacity: 0.7;
}

.settings-btn svg {
    width: 24px;
    height: 24px;
}


h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
}

.add-btn {
    background: none;
    color: #000;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    opacity: 0.7;
}

.add-btn svg {
    width: 24px;
    height: 24px;
}


.main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    
    padding-bottom: calc(13.0208333333vw + env(safe-area-inset-bottom, 0) + 16px);
    
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}


@media (min-width: 1024px) {
    .main {
        max-width: 1550px;
    }
}


.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1400px) {
    .items-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}


.item-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #000;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover .title,
.item-card:hover .price,
.item-card:hover .domain {
    text-decoration: underline;
}


.item-card .card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}


.item-card .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;              
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-2, #f1f1f1);
}


.item-card .thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;                 
    opacity: 0;
    transition: opacity .2s ease;
}


.item-card .thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;                 
    opacity: 0;
    transition: opacity .2s ease;
}


.item-card .thumb .video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}


.item-card .thumb .play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s ease;
}

.item-card .thumb .play-button-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
}


.item-card .thumb.loaded img {
    opacity: 1;
}


.item-card .thumb.loaded video {
    opacity: 1;
}


.item-card .thumb.placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.05) 25%,
        rgba(0,0,0,0.08) 37%,
        rgba(0,0,0,0.05) 63%
    );
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


.item-card .thumb.no-image {
    background:
        radial-gradient( circle at 30% 30%, rgba(0,0,0,.07) 0 35%, transparent 36%) 0 0/50% 50%,
        radial-gradient( circle at 70% 70%, rgba(0,0,0,.07) 0 35%, transparent 36%) 0 0/50% 50%,
        var(--surface-2, #f1f1f1);
}


.image-placeholder {
    position: absolute;
    inset: 0;
    background: #f2f2f2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 16px;
}

.placeholder-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.placeholder-text {
    font-weight: 500;
    line-height: 1.2;
    word-break: break-word;
    max-width: 100%;
}


.item-card .overflow-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    background: none;
    border: none;
    color: #111;
    cursor: pointer;
}

.item-card .overflow-btn:active {
    transform: scale(0.96);
}


.item-card .meta {
    padding: 12px;
    color: #000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.item-card .title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 6px;
    
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #000;
}

@media (min-width: 768px) {
    .item-card .title {
        font-size: 16px;
    }
}

.item-card .price {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 4px;
    color: #000;
}

@media (min-width: 768px) {
    .item-card .price {
        font-size: 16px;
    }
}

.item-card .domain {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .item-card .domain {
        font-size: 14px;
    }
}


.item-card.optimistic {
    
    transition: opacity 0.3s ease;
}


.item-card .thumb--loading,
.item-card .thumb--loading * {
    pointer-events: none;
}


.item-card .overflow-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    pointer-events: auto;
}


.item-card .menu { 
    pointer-events: none; 
    z-index: 9999; 
}
.item-card .menu.active { 
    pointer-events: all; 
}

.item-card.optimistic .thumb {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.item-card.optimistic .title {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
    border-radius: 4px;
}

.item-card.optimistic .price {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
    border-radius: 2px;
    width: 60px;
}

.item-card.optimistic .domain {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
    border-radius: 2px;
    width: 80px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


.item-card .image-skeleton {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    pointer-events: none;
}


.skeleton,
.shimmer,
.item-card .image-placeholder {
    pointer-events: none;
}


.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.menu {
    position: fixed;
    z-index: 1001;
    min-width: 180px;
    background: #fff;
    color: #000000 !important; 
    -webkit-text-fill-color: #000000; 
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
}

.overflow-menu {
    position: absolute;
    right: 8px;
    top: 36px;
    z-index: 4;
}

.menu[hidden] {
    display: none !important;
}

.menu-item {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    font-size: 16px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    color: #000000 !important; 
    -webkit-text-fill-color: #000000; 
}

.menu-item:last-child {
    border-bottom: 0;
}

.menu-item:hover {
    background: #f8fafc;
}

.menu-item.danger {
    color: #dc2626 !important; 
    -webkit-text-fill-color: #dc2626; 
}


.card-footer, .card .overlay {
    display: none !important;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #000000;
}


.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 10rem 1rem;
    color: #666666;
    text-align: center;
}

.empty-image {
    width: 300px;
    height: 300px;
}

.empty-state p:first-of-type {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.empty-state p:last-of-type {
    font-size: 0.875rem;
    color: #6b7280;
}


:root {
    --inset-bottom: max(env(safe-area-inset-bottom, 0px), 12px);
}


.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 1000;
}


.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 1001;
    will-change: transform;
}


.sheet-content {
    padding: 16px;
    padding-bottom: calc(16px + var(--inset-bottom));
    max-height: calc(100dvh - 64px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}


.sheet-handle {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
    margin: 8px auto 10px;
}


.sheet.is-open {
    transform: translateY(0);
}

.sheet-backdrop.is-open {
    opacity: 1;
}


body.sheet-open {
    overflow: hidden;
    touch-action: none;
}




#addForm {
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #000000;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}


.input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 4px;
    margin-bottom: 1rem;
}

.input-container input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    border-radius: 20px;
}

.input-container input:focus {
    box-shadow: none;
}

.input-container input::placeholder {
    color: #6c757d;
}

.add-button {
    width: 40px;
    height: 40px;
    border: none;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.add-button:hover {
    background: #333;
}

.add-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.add-button svg {
    width: 20px;
    height: 20px;
    color: white;
}

.form-actions {
    display: flex;
    margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-primary {
    background: #000000;
    color: white;
}

.btn-primary:hover {
    background: #333333;
}

.btn-secondary {
    background: #f1f5f9;
    color: #000000;
}

.btn-secondary:hover {
    background: #e5e5e5;
}




#toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(16px);
    background: #000000;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#toast.success {
    background: #000000;
}

#toast.error {
    background: #000000;
}

#toast.info {
    background: #000000;
}

#toast.warning {
    background: #000000;
}


@media (min-width: 768px) {
    main {
        padding: 1.5rem;
    }
    
    
    .auth-email-section input[type="email"] {
        width: 320px;
        max-width: 320px;
    }
    
    .btn-primary,
    .auth-btn {
        width: 320px;
    }
    
    .auth-content {
        max-width: 400px;
    }
    
    .auth-divider {
        width: 320px;
    }
}


@media (max-width: 767px) {
    .auth-content {
        padding: 0 16px;
    }
    
    .auth-email-section,
    .auth-email-section .form-group {
        max-width: 100%;
    }
    
    .btn-primary,
    .auth-btn {
        width: 100%;
        max-width: 320px;
    }
    
    .auth-divider {
        width: 100%;
        max-width: 320px;
    }
}


.loading {
    opacity: 0.6;
    pointer-events: none;
}


.error {
    color: #000000;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}


.quick-add-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.quick-add-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.quick-add-content h1 {
    margin-bottom: 2rem;
    color: #000000;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
}

.error-message p {
    margin-bottom: 1rem;
    color: #000000;
}


.settings-content {
    padding: 1.5rem;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000000;
}

.settings-section p {
    margin-bottom: 0.5rem;
    color: #666666;
    font-size: 0.875rem;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
}

.settings-actions button {
    flex: 1;
}


.preview {
    margin: 1.5rem 0;
    text-align: center;
}


.preview-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f7f7f7;
    margin-bottom: 1rem;
}


.preview-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: #000000;
    line-height: 1.4;
}

.preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666666;
}

.linklike {
    background: none;
    border: none;
    color: #000000;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    margin: 0;
}

.linklike:hover {
    opacity: 0.7;
}


.hidden {
    display: none !important;
}


.bottom-blur {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 13.0208333333vw;
    background: linear-gradient(180deg, transparent 0, white 100%);
    pointer-events: none;
}


.store-tags {
    display: flex;
    gap: 8px;
    padding: 0px 4px 24px; 
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
}

.store-tags::-webkit-scrollbar {
    display: none;
}

.tag-chip {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.tag-chip:hover {
    background: #f8fafc;
}

.tag-chip.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.tag-count {
    opacity: 0.6;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}


.header-divider, .bottom-divider {
    display: none !important;
}


.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.initial-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    margin-bottom: 16px;
}

.loader-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    min-height: 100vh;
    text-align: center;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}


@media (max-width: 768px) {
    .auth-screen {
        padding: 20px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .auth-content {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        flex-shrink: 0;
    }
}


.auth-screen ~ .topbar,
.auth-screen ~ header {
    display: none !important;
}


body.authenticated .auth-screen {
    display: none !important;
}

body.authenticated .topbar {
    display: block !important;
}

body.authenticated .main {
    display: block !important;
}
.auth-logo {
    width: 120px;
    height: auto;
    margin-bottom: 16px;
}
.auth-subtitle {
    margin-bottom: 32px;
    color: rgba(0,0,0,.65);
    font-size: 16px;
}

.auth-btn {
    width: min(320px, 88vw);
    height: 52px;
    border-radius: 12px;
    border: none;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.auth-btn:hover {
    background: #333;
}

.auth-btn:active {
    background: #222;
}

.auth-btn:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.auth-btn-google .gmark { width: 24px; height: 24px; background: url(/assets/google.svg) no-repeat center/contain; }

.auth-btn-retry {
    background: #666;
    margin-top: 12px;
}

.auth-btn-retry:hover {
    background: #555;
}


.auth-loading-spinner {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}


.auth-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.auth-email-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
}

.auth-email-section .form-group {
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 320px;
}

.auth-email-section input[type="email"] {
    width: 100%;
    max-width: 320px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    box-sizing: border-box;
}

.auth-divider {
    width: 320px;
    max-width: 100%;
    height: 1px;
    background: #e0e0e0;
    margin: 24px auto;
}

.auth-message {
    margin: 0.5rem 0;
    font-size: 14px;
    min-height: 20px;
    color: #e74c3c;
}

.auth-message:empty {
    display: none;
}


.otp-email {
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}


.email-illustration {
    width: 300px;
    height: 300px;
    margin: 16px 0 24px 0;
    object-fit: cover;
}

.confirm-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.confirm-description {
    margin-bottom: 32px;
    max-width: 320px;
}

.confirm-description p {
    margin: 0 0 12px 0;
    color: rgba(0,0,0,.65);
    font-size: 16px;
    line-height: 1.5;
}

.confirm-description p:last-child {
    margin-bottom: 0;
}

.user-email {
    font-weight: 600;
    color: #333;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.confirm-actions .btn-secondary,
.confirm-actions .btn-primary {
    width: 320px;
    max-width: 100%;
}


@media (max-width: 768px) {
    #emailConfirm {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: center;
    }
    
    .email-illustration {
        width: 200px;
        height: 200px;
        margin: 12px 0 20px 0;
    }
    
    .confirm-title {
        font-size: 24px;
        margin: 0 0 20px 0;
    }
    
    .confirm-description {
        margin-bottom: 28px;
        max-width: 280px;
    }
    
    .confirm-description p {
        font-size: 15px;
        margin: 0 0 10px 0;
    }
    
    .confirm-actions .btn-secondary,
    .confirm-actions .btn-primary {
        width: 280px;
    }
}

@media (max-width: 480px) {
    #emailConfirm {
        justify-content: center;
    }
    
    .email-illustration {
        width: 160px;
        height: 160px;
        margin: 10px 0 16px 0;
    }
    
    .confirm-title {
        font-size: 22px;
        margin: 0 0 16px 0;
    }
    
    .confirm-description {
        margin-bottom: 24px;
        max-width: 260px;
    }
    
    .confirm-description p {
        font-size: 14px;
        margin: 0 0 8px 0;
    }
    
    .confirm-actions .btn-secondary,
    .confirm-actions .btn-primary {
        width: 260px;
    }
}

.otp-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 320px;
}

@media (min-width: 768px) {
    .otp-grid {
        max-width: 320px;
    }
}

.otp-grid input {
    width: 100%;
    height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background: #ffffff;
    box-sizing: border-box;
}

.otp-grid input:focus {
    border-color: #007AFF;
    outline: none;
}

.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
}

.btn-primary {
    width: min(320px, 88vw);
    height: 52px;
    border-radius: 12px;
    border: none;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    background: #333;
}

.btn-primary:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.auth-loading-spinner .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
    max-width: min(420px, 88vw);
    animation: fadeIn 0.3s ease-in;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


.avatar-btn {
    width: 32px; height: 32px;
    padding: 0; border: 0; background: transparent;
    border-radius: 999px; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
}
.avatar-btn img { width: 32px; height: 32px; border-radius: 50%; display: block; }


.avatar-fallback {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: black;
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.account-popover {
    position: absolute;
    min-width: 220px;
    max-width: 280px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    z-index: 10000;
}

.acc-name { font-size: 16px; font-weight: 700; color: #111; padding: 12px 14px; }
.acc-email { font-size: 13px; color: rgba(0,0,0,.6); padding: 0 14px 12px; }
.acc-divider { height: 1px; background: rgba(0,0,0,.08); margin: 6px 0; }
.acc-logout { 
    width: 100%; 
    text-align: left; 
    padding: 12px 14px; 
    background: transparent; 
    border: 0; 
    color: #d00; 
    font-weight: 600; 
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.acc-logout:hover {
    background: rgba(221, 0, 0, 0.05);
}

.acc-logout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.account-label {
    color: var(--muted, #6b7280);
    font-size: 14px;
}

.account-value {
    font-weight: 600;
    color: #000000;
}

.account-danger {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    border-radius: 12px;
    background: var(--danger-weak, #fef2f2);
    color: var(--danger, #dc2626);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.account-danger:hover {
    background: var(--danger-weak-hover, #fee2e2);
}

.sheet-divider {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 16px 0;
}

.sheet-body {
    padding: 1.5rem;
}