/* ===== PAGE-SPECIFIC STYLES - pages.css ===== */

/* ===== HOME PAGE ===== */
.welcome-section {
    font-family: var(--font-family-primary);
}

.stats-simple {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
    margin: 25px 0;
    padding: 15px;
    background: var(--bg-card-alt);
    border-radius: var(--radius-lg);
}

.center-photo {
    text-align: center;
    margin: 30px 0;
}

.center-photo img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid white;
}

/* ===== THREE PHOTOS IN A ROW ===== */

.photo-row {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

.photo-row img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-xl);
    border: 2px solid white;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .photo-row {
        flex-direction: column;
        align-items: center;
    }
    
    .photo-row img {
        width: 90%;
        height: auto;
    }
}

.simple-links {
    list-style: none;
    padding: 0;
}

.simple-links li {
    margin-bottom: 12px;
    padding-left: 0;
}

.recent-section {
    margin-top: 35px;
}

.recent-album {
    margin-bottom: 8px;
    padding: 8px 0;
}

/* ===== ALBUM DETAIL PAGE ===== */
.album-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.album-header h1 {
    cursor: pointer;
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-normal);
}

.album-header h1:hover {
    background-color: rgba(139, 115, 85, 0.1);
}

.edit-title-form {
    display: none;
    margin: var(--spacing-sm) 0;
}

.edit-title-input {
    font-size: var(--font-size-huge);
    font-family: var(--font-family-primary);
    color: var(--color-accent);
    background-color: var(--bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs) var(--spacing-md);
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.album-controls {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    gap: var(--spacing-sm);
}

.album-description {
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: var(--spacing-md);
    font-size: 1.1em;
}

.album-stats {
    color: var(--color-primary);
    font-size: var(--font-size-base);
}

.album-navigation {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: var(--bg-card-alt);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
}

.album-nav-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--color-secondary);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.album-nav-btn:hover {
    background-color: var(--color-accent);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.album-nav-upload {
    background-color: var(--color-primary);
}

.album-nav-upload:hover {
    background-color: var(--color-primary-dark);
}

/* Photo Grid Layout */
.photos-scrapbook {
    margin-bottom: var(--spacing-xxl);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.photo-card {
    background: var(--bg-card);
    border-radius: var(--radius-xxl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-light);
    position: relative;
    cursor: grab;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
    max-width: 100%;
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.photo-card:active {
    cursor: grabbing;
}

.photo-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.photo-card.drag-over {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.photo-image {
    width: 100%;
    min-height: 200px;
    max-height: 70vh;
    background-size: contain;
    background-position: center;
    background-color: var(--bg-light);
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 3em;
    position: relative;
}

.photo-image.landscape {
    height: auto;
    min-height: 300px;
    max-height: 500px;
}

.photo-image.portrait {
    height: auto;
    min-height: 400px;
    max-height: 70vh;
}

.photo-image.square {
    height: auto;
    min-height: 350px;
    max-height: 450px;
}

.photo-info {
    padding: var(--spacing-lg);
    background: var(--bg-card-alt);
}

.photo-order {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-md);
    font-weight: bold;
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    z-index: 2;
}

.drag-handle {
    position: absolute;
    top: var(--spacing-md);
    right: 60px;
    background: rgba(139, 115, 85, 0.8);
    color: white;
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: grab;
    font-size: var(--font-size-md);
    z-index: 2;
    display: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.photo-controls {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    display: flex;
    gap: var(--spacing-xs);
    z-index: 3;
}

.photo-control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.photo-control-btn:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.photo-control-btn.delete {
    color: var(--color-error);
    border-color: var(--color-error);
}

.photo-control-btn.delete:hover {
    background: var(--color-error);
    color: white;
}

.photo-title {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--color-accent);
    margin-bottom: 8px;
    line-height: 1.3;
}

.photo-meta {
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.4;
}

.photo-description {
    color: #6d5e4a;
    line-height: 1.5;
    font-size: var(--font-size-base);
    font-style: italic;
    margin-top: var(--spacing-sm);
}

.empty-album {
    text-align: center;
    padding: 60px var(--spacing-lg);
    color: var(--color-text-light);
}

.reorder-mode {
    background-color: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--color-warning);
}

/* ===== COLLECTIONS PAGE ===== */
.collection {
    background: linear-gradient(135deg, var(--bg-card-alt) 0%, #f0ede5 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xxl);
    margin-bottom: var(--spacing-xxl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.collection-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: var(--spacing-lg);
    position: relative;
}

.collection-title {
    font-size: var(--font-size-xxl);
    font-weight: bold;
    margin-bottom: 8px;
}

.collection-meta {
    font-size: var(--font-size-base);
    opacity: 0.9;
}

.collection-description {
    margin-top: var(--spacing-sm);
    font-style: italic;
    opacity: 0.9;
}

.collection-albums {
    padding: var(--spacing-lg);
}

.collection-stats {
    font-size: var(--font-size-md);
    background: rgba(255,255,255,0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    display: inline-block;
}

.date-badge {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: rgba(255,255,255,0.15);
    padding: 8px var(--spacing-md);
    border-radius: 20px;
    font-size: var(--font-size-base);
    font-weight: bold;
}

/* Uncategorized Albums */
.uncategorized {
    background: #f9f7f4;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-xxl);
    padding: 25px;
    margin-bottom: var(--spacing-xxl);
}

.uncategorized h2 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.uncategorized-note {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: var(--spacing-lg);
}

/* Collection Summary */
.collection-summary {
    background: var(--bg-card-alt);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: var(--spacing-xxl);
    text-align: center;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.stat-item {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-primary);
    display: block;
}

.stat-label {
    color: var(--color-text-light);
    font-size: var(--font-size-base);
    margin-top: var(--spacing-xs);
}

/* ===== ALBUM GRID LAYOUTS ===== */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: var(--spacing-xxl);
}

.album-card {
    background: var(--bg-card-alt);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xxl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.album-card .album-thumbnails {
    height: 180px;
    background: var(--bg-light);
}

.album-card .thumbnail-item {
    background-color: var(--bg-light-alt);
    font-size: var(--font-size-base);
}

.album-card .thumbnail-item.single {
    font-size: 2.5em;
}

.album-card .album-info {
    padding: var(--spacing-lg);
}

.album-card .album-title {
    font-size: var(--font-size-xl);
    font-weight: bold;
    color: var(--color-accent);
    margin-bottom: 8px;
    line-height: 1.3;
}

.album-card .album-description {
    color: var(--color-text-light);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    font-style: italic;
}

.album-card .album-meta {
    color: var(--color-primary);
    font-size: 13px;
    margin-bottom: var(--spacing-md);
}

.album-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== BUCKET LIST PAGE ===== */
.polaroid-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.margin-polaroid {
    position: absolute;
    pointer-events: all;
    animation: float 6s ease-in-out infinite;
    animation-delay: calc(var(--item-order) * 0.5s);
}

.margin-polaroid:nth-child(odd) {
    left: 20px;
    top: calc(150px + ((var(--item-order) - 1) * 48px));
}

.margin-polaroid:nth-child(even) {
    right: 20px;
    top: calc(150px + ((var(--item-order) - 1) * 48px));
}

.polaroid-frame {
    background: white;
    padding: 8px 8px 25px 8px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-5deg);
    width: 100px;
    position: relative;
    border-radius: 3px;
}

.polaroid-frame:nth-child(even) {
    transform: rotate(3deg);
}

.polaroid-frame img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.polaroid-number {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    font-family: var(--font-family-casual);
}

.remove-image-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
}

.polaroid-frame:hover .remove-image-btn {
    display: block;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-5px) rotate(-5deg); }
}

.bucket-list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 150px;
}

.bucket-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}

.bucket-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.bucket-item.completed {
    background: var(--color-success-bg) !important;
    border-color: var(--color-success-border) !important;
    opacity: 0.8;
}

.item-number {
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.bucket-item.completed .item-number {
    background: var(--color-success) !important;
}

.item-checkbox {
    margin-right: 12px;
}

.checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.item-text {
    flex: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background-color var(--transition-normal);
}

.item-text:hover {
    background: rgba(139, 115, 85, 0.1);
}

.bucket-item.completed .item-text {
    text-decoration: line-through;
    color: #999;
}

.item-text.editing {
    background: white;
    border: 2px solid var(--color-primary);
    outline: none;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background-color var(--transition-normal);
}

.upload-btn:hover {
    background: rgba(139, 115, 85, 0.1);
}

.has-image {
    font-size: 14px;
    color: var(--color-success);
}

/* ===== SPECIAL NOTE PAGE ===== */
/* ===== SPECIAL NOTE PAGE - FIXED POLAROIDS ===== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden; /* Prevent overflow */
}

/* Side Images - Larger and closer */
.left-images, .right-images {
    position: absolute;
    top: 120px;
    width: 180px; /* Increased from 160px */
    z-index: 1;
    max-height: calc(100% - 160px);
    overflow: visible; /* Allow polaroids to show fully */
}

.left-images {
    left: 30px; /* Moved closer from 10px */
}

.right-images {
    right: 30px; /* Moved closer from 10px */
}

.side-image {
    margin-bottom: 30px; /* Increased spacing */
    opacity: 0.8;
    transition: all var(--transition-normal);
    display: flex;
    justify-content: center;
}

.side-image:hover {
    opacity: 1;
    transform: scale(1.05) rotate(2deg);
}

/* Larger Polaroid styling */
.polaroid {
    background: white;
    padding: 12px 12px 40px 12px; /* Increased padding */
    box-shadow: var(--shadow-lg);
    transform: rotate(-2deg);
    max-width: 160px; /* Increased from 140px */
    width: auto;
    border-radius: 5px; /* Added border radius */
}

.polaroid:nth-child(even) {
    transform: rotate(2deg);
}

.polaroid img {
    width: 100%;
    height: auto;
    min-height: 80px; /* Increased from 60px */
    max-height: 140px; /* Increased from 120px */
    object-fit: cover;
    border: 1px solid #ddd;
    display: block;
    border-radius: 3px;
}

.polaroid-caption {
    text-align: center;
    font-family: var(--font-family-casual);
    font-size: 15px; /* Slightly larger */
    color: #666;
    margin-top: 8px; /* More space from image */
    font-weight: 500;
    line-height: 1.2;
}

/* Note paper - Adjusted margins for larger polaroids */
.note-paper {
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.95) 0%, 
        rgba(255,250,240,0.95) 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 30px;
    margin-left: 240px; /* Increased from 160px to accommodate larger polaroids */
    margin-right: 240px; /* Increased from 160px */
    z-index: 2;
    min-height: 400px; /* Ensure minimum height */
}

.note-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    right: 0;
    height: 100%;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 24px,
        rgba(255,182,193,0.3) 25px
    );
    pointer-events: none;
}

.note-paper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50px;
    width: 2px;
    height: 100%;
    background: rgba(255,182,193,0.5);
    pointer-events: none;
}

.note-text {
    font-family: var(--font-family-casual);
    font-size: 1.4em;
    line-height: 1.8;
    color: var(--color-accent);
    position: relative;
    z-index: 2;
}

.greeting {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
    text-align: left;
}

.message-content {
    min-height: 300px;
    padding: 20px 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.signature {
    text-align: right;
    margin-top: 30px;
    font-size: 1.3em;
    color: var(--color-primary);
}

.signature-name {
    font-family: var(--font-family-script);
    font-size: 1.4em;
    color: #d4738a;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.note-decorations {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    font-size: 1.5em;
    opacity: 0.6;
}

/* Bottom scattered images - also larger */
.bottom-images {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    opacity: 0.7;
    padding: 0 240px; /* Match note paper margins */
}

.bottom-images .polaroid {
    transform: rotate(-5deg);
    max-width: 140px; /* Larger bottom polaroids too */
}

.bottom-images .polaroid:nth-child(2) {
    transform: rotate(3deg);
    margin-top: -10px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .left-images {
        left: 25px;
        width: 160px;
    }
    
    .right-images {
        right: 25px;
        width: 160px;
    }
    
    .note-paper {
        margin-left: 200px;
        margin-right: 200px;
    }
    
    .bottom-images {
        padding: 0 200px;
    }
}

@media (max-width: 1200px) {
    .left-images {
        left: 20px;
        width: 140px;
    }
    
    .right-images {
        right: 20px;
        width: 140px;
    }
    
    .polaroid {
        max-width: 130px;
        padding: 10px 10px 35px 10px;
    }
    
    .polaroid img {
        max-height: 120px;
    }
    
    .note-paper {
        margin-left: 160px;
        margin-right: 160px;
    }
    
    .bottom-images {
        padding: 0 160px;
    }
}

@media (max-width: 1024px) {
    .left-images, 
    .right-images, 
    .bottom-images {
        display: none;
    }
    
    .note-paper {
        margin-left: 0;
        margin-right: 0;
    }
    
    .container {
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    
    .note-paper {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .note-text {
        font-size: 1.2em;
    }
}

/* Add floating animation to side polaroids */
.side-image {
    animation: gentleFloat 8s ease-in-out infinite;
}

.side-image:nth-child(2n) {
    animation-delay: -2s;
}

.side-image:nth-child(3n) {
    animation-delay: -4s;
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(-2deg); 
    }
    50% { 
        transform: translateY(-8px) rotate(-2deg); 
    }
}

.side-image:nth-child(even) {
    animation-name: gentleFloatReverse;
}

@keyframes gentleFloatReverse {
    0%, 100% { 
        transform: translateY(0px) rotate(2deg); 
    }
    50% { 
        transform: translateY(-8px) rotate(2deg); 
    }
}
/* ===== UPLOAD PAGES ===== */
.upload-form {
    background-color: var(--bg-card-alt);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    border: 2px solid var(--border-light);
}

.recent-photos {
    margin-top: var(--spacing-xl);
}

.photo-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    background-color: var(--bg-card-alt);
}

.photo-thumb {
    width: 80px;
    height: 80px;
    margin-right: var(--spacing-md);
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 24px;
    overflow: hidden;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.photo-info h4 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--color-accent);
}

.photo-info p {
    margin: 0;
    color: var(--color-text-light);
    font-size: var(--font-size-base);
}

.file-info {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ===== EMPTY STATES ===== */
.empty-state,
.empty-collection,
.empty-album,
.no-albums {
    text-align: center;
    padding: 60px var(--spacing-lg);
    color: var(--color-text-light);
}

.empty-state h3,
.empty-collection h3 {
    color: var(--color-primary);
    font-size: 1.8em;
    margin-bottom: var(--spacing-md);
}

.empty-state p,
.empty-collection p {
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.5;
}