/* Minimal SaaS Design - PhotoRadar */

:root {
    /* Modern Blue for Top */
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #60a5fa;
    
    /* Modern Success (Good) */
    --color-success: #22c55e;
    --color-success-dark: #16a34a;
    
    /* Modern Warning/Danger (OK) */
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Dark Theme Colors */
    --color-bg-primary: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #141414;
    --color-bg-card: #1a1a1a;
    --color-bg-modal: #0f0f0f;
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #d1d5db;
    --color-text-tertiary: #9ca3af;
    
    --color-border: #2a2a2a;
    --color-border-light: #3a3a3a;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', system-ui, sans-serif;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern sans-serif for PhotoRadar title */
h1 {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Login Screen */
.login-screen {
    position: fixed;
    inset: 0;
    background: #000000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 10000;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.login-box {
    background: #ffffff;
    padding: 3rem;
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin-left: auto;
}

.login-box h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
    text-align: left;
    letter-spacing: -0.03em;
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.login-subtitle {
    text-align: left;
    color: #666666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#login-form input {
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    font-size: 1rem;
    transition: all 0.2s;
}

#login-form input::placeholder {
    color: #999999;
}

#login-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-btn {
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    text-align: left;
    margin-top: 0.5rem;
    min-height: 1.25rem;
    color: var(--color-danger);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    min-height: 1.5rem;
}

/* Header */
.header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.header-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.stat-value.stat-top { color: var(--color-primary-light); }
.stat-value.stat-good { color: var(--color-success); }
.stat-value.stat-ok { color: var(--color-danger); }

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

.filter-select {
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 0.875rem;
    background: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 2rem;
}

.filter-select:hover {
    border-bottom-color: var(--color-primary);
}

.filter-select:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

.progress-bar {
    height: 4px;
    background: var(--color-bg-secondary);
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--color-bg-primary);
}

.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-tertiary);
    font-size: 1.125rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg-card);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    border: 2px solid var(--color-border);
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-item.rated-top { border-color: var(--color-primary); }
.photo-item.rated-good { border-color: var(--color-success); }
.photo-item.rated-ok { border-color: var(--color-danger); }

.photo-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.photo-badge.badge-top { background: rgba(59, 130, 246, 0.95); color: #fff; }
.photo-badge.badge-good { background: rgba(34, 197, 94, 0.95); color: #000; }
.photo-badge.badge-ok { background: rgba(239, 68, 68, 0.95); color: #fff; }
.photo-badge.badge-blurred { background: rgba(245, 158, 11, 0.95); color: #000; }
.photo-badge.badge-noauth { background: rgba(220, 38, 38, 0.95); color: #fff; }
.photo-badge.badge-delete { background: rgba(107, 114, 128, 0.95); color: #fff; }

.photo-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-filename {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-tertiary);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}

/* Pagination */
.pagination {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem 1.5rem;
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
}

.modal-content {
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: row;
    background: var(--color-bg-modal);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100vh;
}

.modal-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.1);
}

/* Main Image Area */
.modal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--color-bg-primary);
    overflow: hidden;
}

.modal-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.modal-image-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    background: var(--color-bg-primary);
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-secondary);
    font-size: 1rem;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.modal-nav-left {
    left: 1rem;
}

.modal-nav-right {
    right: 1rem;
}

.modal-nav-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Mobile Rating Toggle Button */
.mobile-rating-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10000;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
}

.mobile-rating-toggle:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Side Panel (Desktop) / Bottom Panel (Mobile) */
.modal-info-panel {
    width: 400px;
    max-width: 90vw;
    background: #ffffff;
    border-left: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    position: relative;
    margin-left: 1.5rem;
}

.modal-info-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background: #ffffff;
}

.modal-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    background: #ffffff;
}

.modal-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    background: #ffffff;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    z-index: 10;
    flex-shrink: 0;
    border-bottom: 1px solid #e5e5e5;
}

.modal-info-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.rating-badge-large {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #e5e5e5;
    background: #ffffff;
}

.rating-badge-large.badge-top { 
    border-color: #3b82f6;
    color: #3b82f6;
    background: #ffffff;
}
.rating-badge-large.badge-good { 
    border-color: #22c55e;
    color: #22c55e;
    background: #ffffff;
}
.rating-badge-large.badge-ok { 
    border-color: #ef4444;
    color: #ef4444;
    background: #ffffff;
}
.rating-badge-large.badge-blurred { 
    border-color: #f59e0b;
    color: #f59e0b;
    background: #ffffff;
}
.rating-badge-large.badge-noauth { 
    border-color: #dc2626;
    color: #dc2626;
    background: #ffffff;
}
.rating-badge-large.badge-delete { 
    border-color: #6b7280;
    color: #6b7280;
    background: #ffffff;
}

.modal-info-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    order: 1;
    overflow: visible;
    max-height: none;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.detail-value {
    font-size: 0.875rem;
    color: #1a1a1a;
    font-weight: 500;
}

.modal-actions {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    justify-content: center;
    order: 3;
    padding-top: 1rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-top: 1px solid #e5e5e5;
    margin-top: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.rating-btn {
    padding: 1rem 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 80px;
}

.rating-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.rating-btn.rating-btn-top:hover { 
    border-color: #3b82f6;
    background: #ffffff;
    color: #1a1a1a;
}
.rating-btn.rating-btn-good:hover { 
    border-color: #22c55e;
    background: #ffffff;
    color: #1a1a1a;
}
.rating-btn.rating-btn-ok:hover { 
    border-color: #ef4444;
    background: #ffffff;
    color: #1a1a1a;
}
.rating-btn.rating-btn-blurred:hover { 
    border-color: #f59e0b;
    background: #ffffff;
    color: #1a1a1a;
}
.rating-btn.rating-btn-noauth:hover { 
    border-color: #dc2626;
    background: #ffffff;
    color: #1a1a1a;
}

.rating-btn.active {
    box-shadow: var(--shadow-md);
}

.rating-btn-top.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #3b82f6;
    border-left: 4px solid #3b82f6;
}
.rating-btn-good.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #22c55e;
    border-left: 4px solid #22c55e;
}
.rating-btn-ok.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #ef4444;
    border-left: 4px solid #ef4444;
}
.rating-btn-blurred.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #f59e0b;
    border-left: 4px solid #f59e0b;
}
.rating-btn-noauth.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #dc2626;
    border-left: 4px solid #dc2626;
}
.rating-btn-delete.active { 
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #6b7280;
    border-left: 4px solid #6b7280;
}

.rating-btn-top {
    color: #1a1a1a;
}

.rating-btn-good {
    color: #1a1a1a;
}

.rating-btn-ok {
    color: #1a1a1a;
}

/* Mobile Panel Actions */
.mobile-panel-actions {
    display: none;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #e5e5e5;
    background: #ffffff;
}

.btn-primary {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
}

.rating-icon {
    font-size: 1.5rem;
    display: inline-block !important;
    line-height: 1;
    opacity: 1 !important;
    visibility: visible !important;
    filter: grayscale(100%) contrast(1.5) brightness(0.7);
    -webkit-filter: grayscale(100%) contrast(1.5) brightness(0.7);
    width: 2.5rem;
    height: 2.5rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    color: #1a1a1a;
}

.rating-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.2;
}

.rating-shortcut-text {
    font-size: 0.75rem;
    opacity: 0.6;
    font-weight: 400;
    margin-left: 0.25rem;
}

.rating-shortcut {
    display: none; /* Hide old shortcut badge */
}

/* Header Logo */
.header-logo-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    height: 32px;
    width: auto;
}

/* Notes Section */
.modal-notes-section {
    margin-bottom: 1.5rem;
    order: 2;
    display: block;
    opacity: 1;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.notes-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 1;
}

.notes-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    display: block;
    opacity: 1;
}

.notes-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Collections Section */
.modal-collections-section {
    margin-bottom: 1.5rem;
    order: 3;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.collections-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.collections-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.collections-select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-small {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    height: auto;
    line-height: 1.4;
}

.current-collections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collection-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--color-text-primary);
}

.collection-tag-remove {
    cursor: pointer;
    color: var(--color-danger);
    font-weight: bold;
    padding: 0 0.25rem;
}

.collection-tag-remove:hover {
    color: var(--color-text-primary);
}

.rating-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.rating-shortcut {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    padding: 0.25rem 0.5rem;
    background: var(--color-bg-secondary);
    border-radius: 4px;
}

/* Help Modal */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.help-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.help-content h2 {
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.help-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 6px;
    color: var(--color-text-secondary);
}

.help-item kbd {
    padding: 0.25rem 0.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

.help-close {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    /* Login Screen - Mobile */
    .login-screen {
        justify-content: center;
        align-items: center;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        min-height: 100vh !important;
    }
    
    .login-box {
        max-width: 90%;
        width: 90%;
        height: auto;
        min-height: auto;
        padding: 2rem 1.5rem;
        border-radius: 8px;
        margin: 0;
        position: relative;
        z-index: 2;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .login-box h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .login-subtitle {
        text-align: center;
    }
    
    /* Header - Mobile */
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .header-stats {
        justify-content: space-around;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .filter-select,
    .btn-secondary {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Main Content - Mobile */
    .main-content {
        padding: 1rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    /* Modal - Mobile */
    .modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        flex-direction: column;
        display: flex !important;
        height: 100vh;
    }
    
    .modal-main {
        flex: 1;
        min-height: 0;
    }
    
    .modal-image-wrapper {
        padding: 1rem;
    }
    
    .modal-nav-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .modal-nav-left {
        left: 0.5rem;
    }
    
    .modal-nav-right {
        right: 0.5rem;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.9);
        z-index: 10002;
    }
    
    /* Mobile: Panel starts hidden, slides up from bottom */
    .modal-info-panel {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        height: 75vh;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
        transition: bottom 0.3s ease-out;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        border-left: none;
        border-top: 1px solid #e5e5e5;
        background: #ffffff;
        margin-left: 0;
    }
    
    .modal-info-panel.panel-open {
        bottom: 0;
    }
    
    .mobile-rating-toggle {
        display: block;
    }
    
    .mobile-panel-actions {
        display: flex;
        background: #ffffff;
    }
    
    .modal-info-content {
        padding-bottom: 1rem;
        background: #ffffff;
    }
    
    .modal-info {
        background: #ffffff;
    }
    
    .modal-info-header {
        background: #ffffff;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .modal-info-details {
        background: #ffffff;
        border: 1px solid #e5e5e5;
    }
    
    .modal-notes-section {
        background: #ffffff;
    }
    
    .modal-collections-section {
        background: #ffffff;
    }
    
    .modal-actions {
        background: #ffffff;
        border-top: 1px solid #e5e5e5;
    }
    
    .modal-nav {
        padding: 1rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .modal-nav-btn {
        padding: 1rem;
        font-size: 1.5rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    .modal-image-container {
        min-height: 50vh;
        max-height: 60vh;
        padding: 1rem;
    }
    
    .modal-image {
        max-height: 60vh;
    }
    
    .modal-info {
        padding: 1rem;
        max-height: none;
        overflow-y: auto;
        flex: 1;
    }
    
    .modal-info-details {
        padding: 1rem;
        grid-template-columns: 1fr;
    }
    
    .modal-notes-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .notes-input {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .modal-info-header h2 {
        font-size: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .rating-btn {
        max-width: none;
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        min-height: 56px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .rating-icon {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Pagination - Mobile */
    .pagination {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-btn {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem 1rem;
    }
    
    .page-info {
        width: 100%;
        text-align: center;
        order: -1;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem 1rem;
    }
    
    .login-box h1 {
        font-size: 1.75rem;
    }
    
    .header {
        padding: 0.75rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .modal-nav-btn {
        padding: 0.75rem;
        font-size: 1.25rem;
    }
    
    .modal-info {
        padding: 0.75rem;
    }
    
    .rating-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .modal-close {
        top: 0.25rem;
        right: 0.25rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.25rem;
        background: rgba(0, 0, 0, 0.95) !important;
        z-index: 10003 !important;
    }
}

