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

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(to bottom right, #FEFAE0, #FAEDCD, #E9EDC9);
    min-height: 100vh;
    color: #4A4A4A;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Quicksand', sans-serif;
}

.caveat-text {
    font-family: 'Caveat', cursive;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 163, 115, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.5rem 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4A4A4A;
}

.subtitle {
    font-family: 'Caveat', cursive;
    font-size: 1.25rem;
    color: #8D8D8D;
    margin-top: 0.25rem;
}

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

/* Buttons */
.btn-primary {
    background: #D4A373;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #C39262;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: #E5E5E5;
    color: #4A4A4A;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #8D8D8D;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s;
}

.btn-icon:hover {
    color: #4A4A4A;
}

/* Main Content */
main {
    padding: 3rem 0;
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.album-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.album-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.album-cover {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #FAEDCD, #E9EDC9, rgba(212, 163, 115, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.album-cover-icon {
    font-size: 4rem;
    opacity: 0.4;
}

.album-info {
    padding: 1.5rem;
}

.album-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4A4A4A;
    margin-bottom: 0.5rem;
}

.album-count {
    font-size: 0.875rem;
    color: #8D8D8D;
    margin-bottom: 1rem;
}

.album-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    flex: 1;
    background: #FAEDCD;
    color: #4A4A4A;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-small:hover {
    background: #E9EDC9;
}

.btn-delete {
    background: #FFE5E5;
    color: #FF6B6B;
}

.btn-delete:hover {
    background: #FFD0D0;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.photo-card {
    background: white;
    padding: 1rem;
    padding-bottom: 4rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.5s;
    cursor: pointer;
    position: relative;
}

.photo-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px) rotate(1deg);
}

.photo-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.photo-caption {
    font-family: 'Caveat', cursive;
    font-size: 1.125rem;
    color: #4A4A4A;
    min-height: 2rem;
    padding: 0 0.5rem;
}

.photo-actions {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-card:hover .photo-actions {
    opacity: 1;
}

.btn-round {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn-round:hover {
    transform: scale(1.1);
}

.btn-cover {
    background: #4A90E2;
    color: white;
}

.btn-edit {
    background: #D4A373;
    color: white;
}

.btn-delete-photo {
    background: #FF6B6B;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-text {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #8D8D8D;
    margin-bottom: 0.5rem;
}

.empty-subtext {
    color: #8D8D8D;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    background: rgba(212, 163, 115, 0.2);
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4A4A4A;
}

.modal-subtext {
    font-size: 0.875rem;
    color: #8D8D8D;
    margin-bottom: 1.5rem;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(212, 163, 115, 0.3);
    border-radius: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    font-family: 'Nunito', sans-serif;
}

.input:focus {
    outline: none;
    border-color: #D4A373;
    box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.2);
}

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

.modal-actions button {
    flex: 1;
}

.error-message {
    background: #FFE5E5;
    color: #FF6B6B;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s;
}

.lightbox-close:hover {
    color: #D4A373;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 4rem;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s;
    padding: 1rem;
}

.lightbox-nav:hover {
    color: #D4A373;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.lightbox-caption {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: #4A4A4A;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    color: #4A4A4A;
}

/* Album Page Header */
.album-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#albumTitle {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .photos-grid {
        grid-template-columns: 1fr;
    }
}
