
.photo-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
    z-index: 2;
}

.photo-item-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.play-icon {
    transition: all 0.3s ease;
    pointer-events: auto;
}

.photo-item:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
}


.album-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.album-modal-media {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    z-index: 10001;
}


#fullSizeMediaModal video {
    display: block;
    max-width: 90%;
    max-height: 80vh;
}


#fullSizeMediaModal button,
#fullSizeMediaModal .caption {
    z-index: 10002;
}


.album-button {
    padding: 10px 20px;
    background: #854D27;
    color: #FFF9F3;
    border: 2px solid #D4B08C;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 0;
    box-shadow: 2px 2px 0 #D4B08C;
}


.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: none;
}

.slideshow-slide {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
    z-index: 2;
}

.slideshow-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.slideshow-button {
    padding: 10px 20px;
    background: #854D27;
    color: #FFF9F3;
    border: 2px solid #D4B08C;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 0;
    box-shadow: 2px 2px 0 #D4B08C;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slideshow-button:hover {
    opacity: 1;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(133, 77, 39, 0.7);
    color: #FFF;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slideshow-nav:hover {
    opacity: 1;
    background: rgba(133, 77, 39, 0.9);
}

.slideshow-prev {
    left: 20px;
}

.slideshow-next {
    right: 20px;
}

.slideshow-pagination {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.slideshow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.slideshow-dot.active {
    background: #FFF;
}


.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.tag {
    background: rgba(133, 77, 39, 0.8);
    color: #FFF9F3;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #D4B08C;
}

.tag-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(133, 77, 39, 0.9);
    color: #FFF9F3;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.tag-button:hover {
    background: #854D27;
    transform: scale(1.1);
}


.play-icon-enhanced {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    opacity: 0.8;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 5;
}


.media-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.memory-photo {
    max-height: 80vh;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


.slideshow-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}


.error-message {
    color: #854D27;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    background: rgba(255, 249, 243, 0.9);
    border: 2px solid #D4B08C;
    border-radius: 8px;
    margin: 20px;
}


.modal-base {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10002;
}

.modal-close-button:hover {
    opacity: 0.7;
}


.button-default {
    padding: 10px 20px;
    background: #854D27;
    color: #FFF9F3;
    border: 2px solid #D4B08C;
    cursor: pointer;
    border-radius: 0;
    box-shadow: 2px 2px 0 #D4B08C;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.button-default:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #D4B08C;
}


.fullsize-media {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    z-index: 10001;
}

.media-play-pause-btn {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.media-caption {
    position: absolute;
    bottom: 20px;
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 10002;
}

.media-tag-btn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
}


.tag-modal-content {
    background: #FFF9F3;
    border: 2px solid #D4B08C;
    border-radius: 0;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    box-shadow: 8px 8px 0 #D4B08C;
    position: relative;
    text-align: center;
}

.tag-modal-title {
    color: #854D27;
    margin-bottom: 20px;
    font-family: 'DM Serif Display', serif;
}

.tag-modal-description {
    margin-bottom: 20px;
    color: #2C1810;
}

.tag-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #D4B08C;
    border-radius: 0;
    margin-bottom: 20px;
    font-family: 'Old Standard TT', serif;
    font-size: 16px;
    background: #FFF9F3;
    color: #2C1810;
    box-sizing: border-box;
}

.tag-input:focus {
    outline: none;
    border-color: #854D27;
    box-shadow: 0 0 5px rgba(133, 77, 39, 0.3);
}

.tag-submit-btn {
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 4px 4px 0 #D4B08C;
}

.tag-submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #D4B08C;
}


.upload-item {
    border: 2px dashed #D4B08C;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-item:hover {
    transform: scale(1.05);
    box-shadow: 6px 6px 15px rgba(139, 69, 19, 0.5);
}

.upload-placeholder {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.upload-icon img {
    width: 100px;
    height: 100px;
}

.upload-text {
    color: #854D27;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
}

.upload-file-input {
    display: none;
}


.close-album-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}


.fade-in {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in.active {
    opacity: 1;
}

.fade-out {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-out.active {
    opacity: 0;
}


@media (max-width: 768px) {
    .tag-modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .upload-icon img {
        width: 60px;
        height: 60px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .close-album-btn {
        top: 5px;
        right: 5px;
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .media-caption {
        font-size: 14px;
        padding: 3px 10px;
    }
    
    .slideshow-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .slideshow-button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .tag-modal-content {
        width: 98%;
        padding: 10px;
    }
    
    .tag-input {
        font-size: 14px;
        padding: 8px;
    }
    
    .memory-photo {
        max-height: 70vh;
    }
    
    .slideshow-controls {
        bottom: 10px;
        gap: 10px;
    }
}


.notification {
    position: fixed;
    padding: 12px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.notification.info {
    background-color: #FFF9F3;
    color: #2C1810;
    border: 1px solid #D4B08C;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.notification-text {
    flex: 1;
    font-size: 14px;
}

.notification-progress {
    width: 80px;
    height: 4px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: rgba(255,255,255,0.8);
    transition: width 0.3s ease;
}


.notification.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification.top-right {
    top: 20px;
    right: 20px;
}

.notification.bottom-right {
    bottom: 20px;
    right: 20px;
}


.media-stats-info {
    text-align: center;
    padding: 5px;
    margin-bottom: 10px;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.media-stats-info strong {
    color: #8B4513;
    font-weight: bold;
}


.no-data-message {
    text-align: center;
    padding: 20px;
    color: #8B4513;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #D4B08C;
    margin: 20px;
}


.tag-submit-btn {
    transition: all 0.2s ease;
}

.tag-submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #D4B08C;
}

.tag-modal-close {
    color: #854D27 !important;
}


.error-message-inline {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 20px 0;
}


.search-hidden {
    display: none !important;
}

.search-visible {
    display: block !important;
}


.upload-icon img {
    width: 100px;
    height: 100px;
}


.progress-bar-0 { width: 0% !important; }
.progress-bar-10 { width: 10% !important; }
.progress-bar-20 { width: 20% !important; }
.progress-bar-30 { width: 30% !important; }
.progress-bar-40 { width: 40% !important; }
.progress-bar-50 { width: 50% !important; }
.progress-bar-60 { width: 60% !important; }
.progress-bar-70 { width: 70% !important; }
.progress-bar-80 { width: 80% !important; }
.progress-bar-90 { width: 90% !important; }
.progress-bar-100 { width: 100% !important; }


.display-none { display: none !important; }
.display-block { display: block !important; }
.display-grid { display: grid !important; }
.display-flex { display: flex !important; }


.notification.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.notification.top-right {
    top: 20px;
    right: 20px;
}

.notification.bottom-right {
    bottom: 20px;
    right: 20px;
}


.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.hide {
    opacity: 0;
    transform: translateY(-20px);
}