* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 20px;
}

header h1 {
    color: #5f6368;
    font-size: 22px;
    white-space: nowrap;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
}

.upload-btn button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.toolbar {
    background: white;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.albums {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.album-btn {
    background: #f1f3f4;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.album-btn.active {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
}

#sortSelect {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 5px;
    cursor: pointer;
}

.drop-zone {
    margin: 20px;
    padding: 40px;
    border: 2px dashed #dadce0;
    border-radius: 8px;
    text-align: center;
    color: #5f6368;
    background: white;
    display: none;
}

.drop-zone.active {
    display: block;
    border-color: #1a73e8;
    background: #e8f0fe;
}

.gallery {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.photo-card {
    position: relative;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 8px;
    font-size: 11px;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transition: 0.3s;
}

.photo-card:hover.photo-info {
    opacity: 1;
}

.fav-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 75%;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-buttons {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.fav-btn { background: #fbbc04; color: black; }
.download-btn { background: #1a73e8; color: white; }
.delete-btn { background: #d93025; color: white; }
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logout-btn {
    background: #d93025;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.logout-btn:hover {
    background: #b52d20;
}