/* Hand-drawn awful aesthetic CSS */

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

body {
    font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', 'Marker Felt', 'Trebuchet MS', cursive, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(45deg, #ffeaa7 0%, #fab1a0 50%, #fd79a8 100%);
    background-attachment: fixed;
    color: #2d3436;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Add some "texture" with a repeating pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(0,0,0,.05) 35px, rgba(0,0,0,.05) 70px);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border: 5px solid #000;
    border-radius: 50% 30% 50% 30% / 30% 50% 30% 50%;
    box-shadow: 
        8px 8px 0px rgba(0,0,0,0.3),
        -3px -3px 0px rgba(255,255,255,0.5);
    transform: rotate(-0.5deg);
}

.header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 4px dashed #e74c3c;
    padding-bottom: 20px;
    transform: rotate(0.5deg);
}

.title {
    font-size: 3.5em;
    color: #e74c3c;
    text-shadow: 
        3px 3px 0px #f39c12,
        -2px -2px 0px #3498db,
        4px 4px 0px rgba(0,0,0,0.2);
    letter-spacing: 5px;
    transform: skew(-5deg, 1deg);
    animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: skew(-5deg, 1deg) rotate(0deg); }
    25% { transform: skew(-4deg, 1deg) rotate(0.5deg); }
    50% { transform: skew(-5deg, 0deg) rotate(-0.5deg); }
    75% { transform: skew(-6deg, 1deg) rotate(0.3deg); }
}

.subtitle {
    font-size: 1.2em;
    color: #9b59b6;
    margin-top: 10px;
    font-style: italic;
    transform: rotate(-1deg);
}

.gallery-intro {
    background: #fdcb6e;
    border: 3px solid #000;
    border-radius: 20px 5px 20px 5px;
    padding: 20px;
    margin-bottom: 30px;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2);
    transform: rotate(1deg);
}

.gallery-intro p {
    line-height: 1.8;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.gallery-item {
    text-align: center;
    transition: all 0.3s ease;
    transform: rotate(var(--rotation, 0deg));
}

.gallery-item:nth-child(1) { --rotation: -2deg; }
.gallery-item:nth-child(2) { --rotation: 1.5deg; }
.gallery-item:nth-child(3) { --rotation: -1deg; }
.gallery-item:nth-child(4) { --rotation: 2deg; }
.gallery-item:nth-child(5) { --rotation: -1.5deg; }
.gallery-item:nth-child(6) { --rotation: 1deg; }

.gallery-item:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.frame {
    background: linear-gradient(135deg, #f0f0f0 0%, #d9d9d9 100%);
    border: 8px solid #2d3436;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    padding: 20px;
    box-shadow: 
        10px 10px 0px rgba(0,0,0,0.3),
        -2px -2px 0px rgba(255,255,255,0.5),
        inset 0px 0px 20px rgba(0,0,0,0.1);
    position: relative;
}

.frame::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed rgba(0,0,0,0.2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    pointer-events: none;
}

.image-placeholder {
    background: linear-gradient(45deg, #dfe6e9 25%, #b2bec3 25%, #b2bec3 50%, #dfe6e9 50%, #dfe6e9 75%, #b2bec3 75%, #b2bec3);
    background-size: 20px 20px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed #636e72;
    border-radius: 10px;
    font-size: 1.5em;
    color: #2d3436;
    padding: 20px;
    text-align: center;
}

/* For actual images that users might add later */
.gallery-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 3px solid #fff;
    border-radius: 10px;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    color: #fd79a8;
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#modalImage {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 5px solid #fff;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.modal-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    margin-top: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    border: 3px solid #2d3436;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.modal-info h2 {
    color: #e74c3c;
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #f39c12;
}

.modal-info p {
    color: #2d3436;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 10px 0;
}

#modalMeta {
    font-style: italic;
    color: #636e72;
    font-size: 1em;
}


.caption {
    margin-top: 15px;
    font-size: 1.1em;
    color: #2d3436;
    font-weight: bold;
    background: #74b9ff;
    padding: 10px;
    border: 3px solid #0984e3;
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    line-height: 1.6;
}

.footer {
    text-align: center;
    padding: 20px;
    background: #55efc4;
    border: 4px dotted #00b894;
    border-radius: 0 0 50px 50px / 0 0 30px 30px;
    margin-top: 30px;
    transform: rotate(-0.5deg);
}

.footer p {
    margin: 5px 0;
    font-size: 1.1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .container {
        padding: 20px;
    }

    .modal-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .modal-info {
        max-width: 90%;
        padding: 15px;
    }

    .modal-info h2 {
        font-size: 1.5em;
    }
}

/* Add some "random" squiggly lines decoration */
.header::before,
.header::after,
.footer::before,
.footer::after {
    content: '~~~~~';
    display: block;
    font-size: 2em;
    color: #fd79a8;
    text-align: center;
}
