:root {
    --android-bg: #000000;
    --android-surface: #121212;
    --android-primary: #8ab4f8;
    --android-text: #e8eaed;
    --android-text-secondary: #9aa0a6;
    --error: #f28b82;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--android-bg);
    color: var(--android-text);
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Login Overlay */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--android-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 350px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

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

.login-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.login-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--android-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

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

.input-group input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--android-surface);
    border: 1px solid #333;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--android-primary);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--android-primary);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s, opacity 0.2s;
}

.login-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* App Bar */
.app-bar {
    position: sticky;
    top: 0;
    background: var(--android-bg);
    padding: 1.5rem 1rem 1rem;
    z-index: 100;
    display: flex;
    align-items: center;
}

.app-bar h1 {
    font-size: 1.4rem;
    font-weight: 500;
    flex: 1;
}

.back-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    cursor: pointer;
}

/* Section Headings */
.section-header {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--android-text-secondary);
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 1rem;
}

.album-item { cursor: pointer; }

.album-cover {
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: var(--android-surface);
    margin-bottom: 10px;
}

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

.album-info .title { font-weight: 500; font-size: 0.95rem; }
.album-info .count { color: var(--android-text-secondary); font-size: 0.8rem; }

/* Photo Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--android-surface);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    z-index: 2000;
    flex-direction: column;
}

.lightbox.active { display: flex; }

.lb-header { padding: 1rem; }

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lb-footer { padding: 1.5rem; display: flex; justify-content: space-around; }

.lb-action {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Utilities */
.hidden { display: none !important; }

@media (min-width: 768px) {
    .album-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
}
