/* The i feel everything Wall - CSS */

/* Fullscreen Wall Experience */
.i-feel-everything-wall {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
        linear-gradient(225deg, rgba(120, 119, 198, 0.3), rgba(255, 255, 255, 0.1)),
        linear-gradient(315deg, rgba(132, 204, 22, 0.2), rgba(255, 255, 255, 0.05)),
        linear-gradient(45deg, rgba(239, 68, 68, 0.15), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    z-index: 999999;
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.i-feel-everything-wall.active {
    display: flex;
}

/* Flickering light effect */
.i-feel-everything-wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
    animation: flicker 8s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    2% { opacity: 0.95; }
    4% { opacity: 1; }
    8% { opacity: 0.98; }
    12% { opacity: 1; }
    20% { opacity: 0.97; }
    25% { opacity: 1; }
    50% { opacity: 0.99; }
    55% { opacity: 1; }
    75% { opacity: 0.96; }
    80% { opacity: 1; }
}

/* Header */
.wall-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 30px 40px 20px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.wall-title {
    font-size: 24px;
    font-weight: 200;
    color: #666;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
    text-transform: lowercase;
}

.wall-subtitle {
    font-size: 12px;
    color: #999;
    margin: 0 0 30px 0;
    font-weight: 300;
    font-style: italic;
}

.wall-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: none;
    border: none;
    font-size: 28px;
    color: rgba(136, 136, 136, 0.6);
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.3s ease;
}

.wall-close:hover {
    color: rgba(136, 136, 136, 0.9);
}

/* Filter Controls */
.wall-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 10px;
}

.emotion-filter {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.emotion-filter:hover,
.emotion-filter.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Wall Grid */
.wall-grid {
    position: absolute;
    top: 150px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    --gap: 20px;
    padding: 20px 0;
    align-content: flex-start;
}

/* Wall Tile */
.wall-tile {
    position: relative;
    /* Square using pseudo-element for robust Safari support */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.8s ease;
    opacity: 0.8;
    filter: grayscale(100%) contrast(0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: calc((100% - 5 * var(--gap)) / 6); /* 6 columns desktop */
}

/* Create the square space Safari will measure */
.wall-tile::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.wall-tile:hover {
    opacity: 1;
    filter: grayscale(80%) contrast(1);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Lit up tile animation */
.wall-tile.lit-up {
    opacity: 1;
    filter: grayscale(0%) contrast(1.1) brightness(1.05);
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.wall-tile.lit-up::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    opacity: 0;
    animation: shimmer 2s ease-in-out;
}

@keyframes shimmer {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.wall-tile.maggie-entry {
    border: 2px solid rgba(160, 150, 125, 0.3);
    background: rgba(160, 150, 125, 0.05);
}

.wall-tile.maggie-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(160, 150, 125, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Tile Photo */
.tile-photo {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
}

.wall-tile:hover .tile-photo {
    filter: grayscale(60%) contrast(1.1);
}

/* Tile Overlay */
.tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    z-index: 2;
}

.wall-tile:hover .tile-overlay {
    opacity: 1;
}

.tile-caption {
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 8px;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tile-emotion {
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.tile-emotion.maggie-emotion {
    color: #8B7D6B;
    font-style: italic;
}

.tile-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    margin-top: 4px;
    font-weight: 300;
    font-style: italic;
}

.wall-tile.maggie-entry .tile-name {
    color: #8B7D6B;
}

/* Hover icon removed */

/* Submission Experience */
.wall-submission {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 20;
    padding: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wall-submission.active {
    display: flex;
}

.submission-container {
    max-width: 500px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 1;
    visibility: visible;
}

.submission-title {
    font-size: 20px;
    font-weight: 200;
    color: #555;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.submission-prompt {
    font-size: 13px;
    color: #777;
    margin: 0 0 30px 0;
    font-style: italic;
    line-height: 1.5;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.photo-upload {
    position: relative;
    border: 2px dashed rgba(200, 200, 200, 0.5);
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.photo-upload:hover {
    border-color: rgba(136, 136, 136, 0.7);
    background: rgba(255, 255, 255, 0.7);
}

.photo-upload.drag-over {
    border-color: rgba(136, 136, 136, 0.9);
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.photo-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-text {
    font-size: 12px;
    color: #888;
    font-weight: 300;
}

.photo-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    filter: grayscale(100%) contrast(0.9);
    margin: 10px auto;
}

.caption-input {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    color: #555;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.caption-input:focus {
    outline: none;
    border-color: rgba(136, 136, 136, 0.6);
    background: rgba(255, 255, 255, 0.9);
}

.caption-counter {
    text-align: right;
    font-size: 10px;
    color: #999;
    margin-top: 5px;
}

.name-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    color: #555;
    font-family: inherit;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: rgba(136, 136, 136, 0.6);
    background: rgba(255, 255, 255, 0.9);
}

.name-counter {
    text-align: right;
    font-size: 10px;
    color: #999;
    margin-top: 5px;
}

.emotion-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.emotion-option {
    padding: 12px;
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.emotion-option:hover,
.emotion-option.selected {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(136, 136, 136, 0.6);
    color: #444;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #666;
}

.checkbox-option input[type="checkbox"] {
    margin: 0;
}

.submit-button {
    width: 100%;
    background: rgba(136, 136, 136, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.submit-button:hover:not(:disabled) {
    background: rgba(136, 136, 136, 1);
    transform: translateY(-1px);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Screen */
.submission-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    height: 100vh;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.submission-success.active {
    display: flex;
}

.success-message {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 300;
}

.success-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
}

.preview-tile {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.preview-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(0.9);
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px 15px 15px;
    font-size: 11px;
}

.preview-caption {
    margin-bottom: 5px;
    line-height: 1.4;
}

.preview-emotion {
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Unified share buttons on success */
/* Modern share buttons */
.share-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 14px 18px;
    width: 280px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .35px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .25s ease, filter .25s ease;
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
    backdrop-filter: blur(8px);
}
.share-button::before{
    content: '';
    width: 18px; height: 18px;
    background: #fff;
    opacity: .95;
    margin-right: 6px;
    -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
            mask-size: contain;         mask-repeat: no-repeat;         mask-position: center;
}
.share-button:hover{ transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.share-button:active{ transform: translateY(0); }
.share-button[disabled]{ opacity:.6; cursor:not-allowed; filter: grayscale(.2); }

/* Instagram gradient + icon */
.instagram-share{ background: linear-gradient(135deg,#feda75 0%,#fa7e1e 18%,#d62976 43%,#962fbf 64%,#4f5bd5 100%); }
.instagram-share::before{ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M224 202a54 54 0 1 0 54 54a54 54 0 0 0-54-54Zm124-41a26 26 0 1 0 26 26a26 26 0 0 0-26-26ZM224 338a86 86 0 1 1 86-86a86 86 0 0 1-86 86Zm124 106H100A100 100 0 0 1 0 344V168A100 100 0 0 1 100 68h248a100 100 0 0 1 100 100v176a100 100 0 0 1-100 100ZM100 116A52 52 0 0 0 48 168v176a52 52 0 0 0 52 52h248a52 52 0 0 0 52-52V168a52 52 0 0 0-52-52Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M224 202a54 54 0 1 0 54 54a54 54 0 0 0-54-54Zm124-41a26 26 0 1 0 26 26a26 26 0 0 0-26-26ZM224 338a86 86 0 1 1 86-86a86 86 0 0 1-86 86Zm124 106H100A100 100 0 0 1 0 344V168A100 100 0 0 1 100 68h248a100 100 0 0 1 100 100v176a100 100 0 0 1-100 100ZM100 116A52 52 0 0 0 48 168v176a52 52 0 0 0 52 52h248a52 52 0 0 0 52-52V168a52 52 0 0 0-52-52Z'/%3E%3C/svg%3E"); }

/* X (Twitter) gradient + icon */
.twitter-share{ background: linear-gradient(135deg,#0f0f10 0%, #1f1f22 35%, #0a84ff 100%); }
.twitter-share::before{ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='black' d='M389.2 48h70.6L305.6 224.2L486 464H345L233.7 318.6L106.5 464H35.8l170.5-190.7L32 48h145.6l99 130.6L389.2 48Zm-24.7 374.7h39L151.1 85.6h-41.3Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='black' d='M389.2 48h70.6L305.6 224.2L486 464H345L233.7 318.6L106.5 464H35.8l170.5-190.7L32 48h145.6l99 130.6L389.2 48Zm-24.7 374.7h39L151.1 85.6h-41.3Z'/%3E%3C/svg%3E"); }

/* Download gradient + icon */
.download-share{ background: linear-gradient(135deg,#2b2b31 0%, #6b6b75 50%, #9a9ab2 100%); }
.download-share::before{ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='black' d='M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v306.7L86.6 297.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128zM32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='black' d='M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v306.7L86.6 297.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128zM32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z'/%3E%3C/svg%3E"); }

/* Text card background gallery on small screens */
#tcBgGallery { overflow-x: auto; padding-bottom: 6px; }
#tcBgGallery::-webkit-scrollbar { height: 6px; }
#tcBgGallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 6px; }

/* Mobile fixes for text card color and font controls */
@media (max-width: 768px) {
  #textCardDesigner label { display:block; font-size:14px; }
  #textCardDesigner input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 44px; border: 0; border-radius: 10px;
    padding: 0; background: transparent; box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset;
  }
  #textCardDesigner input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  #textCardDesigner input[type="color"]::-webkit-color-swatch { border: none; border-radius: 10px; }
  #textCardDesigner select, #textCardDesigner input[type="range"] {
    width: 100%; min-height: 44px; border-radius: 10px;
  }
}

/* Mobile refinements */
@media (max-width: 640px) {
    .success-actions { gap: 12px; }
    .share-button { width: calc(100% - 32px); padding: 16px; font-size: 14px; }
    .submission-container { width: 94%; padding: 24px 18px; }
    #textCardDesigner canvas { max-width: 100%; }
}

.return-button {
    background: rgba(136, 136, 136, 0.1);
    color: #666;
    border: 1px solid rgba(136, 136, 136, 0.3);
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.return-button:hover {
    background: rgba(136, 136, 136, 0.2);
    border-color: rgba(136, 136, 136, 0.5);
}

/* Text Card Designer */
#textCardDesigner {
    margin-top: 14px;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

#textCardDesigner canvas {
    width: 100%;
    max-width: 540px;
    height: auto;
    display: block;
    margin: 4px 0 10px 0;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#textCardDesigner label { 
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    display: block;
}

#textCardDesigner select,
#textCardDesigner input[type="color"],
#textCardDesigner input[type="range"] {
    width: 100%;
    margin-top: 6px;
}

#textCardDesigner small { color: rgba(255,255,255,0.6); }

/* === SOCIAL CARD GENERATOR === */
.social-card-generator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.social-card-container {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.social-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(200, 200, 200, 0.3);
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
}

.social-card-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

.social-card-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-card-close:hover {
    background: rgba(136, 136, 136, 0.1);
    color: #333;
}

.social-card-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.card-preview-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#socialCardCanvas {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(136, 136, 136, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.card-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.card-controls {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.text-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-controls label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-controls input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(200, 200, 200, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.text-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.text-controls input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.text-controls span {
    font-size: 11px;
    color: #888;
    text-align: center;
    font-weight: 500;
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-button {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instagram-share {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: white;
}

.instagram-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.4);
}

.twitter-share {
    background: #1da1f2;
    color: white;
}

.twitter-share:hover {
    background: #1a91da;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4);
}

.download-share {
    background: rgba(136, 136, 136, 0.1);
    color: #666;
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.download-share:hover {
    background: rgba(136, 136, 136, 0.2);
    border-color: rgba(136, 136, 136, 0.5);
    transform: translateY(-1px);
}

/* Mobile optimization improvements */
@media (max-width: 768px) {
    .wall-header {
        padding: 15px 20px 10px 20px;
        position: relative;
    }
    
    .wall-title {
        font-size: 22px;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .wall-subtitle {
        font-size: 11px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .wall-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        width: 35px;
        height: 35px;
        padding: 5px;
    }
    
    .wall-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        margin-top: 15px;
        justify-content: center;
    }
    
    .emotion-filter {
        font-size: 10px;
        padding: 6px 12px;
        border-radius: 15px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .emotion-filter.submit-entry {
        background: rgba(136,136,136,0.3) !important;
        font-weight: 500;
        order: 1;
        margin-left: 0 !important;
        margin-top: 5px;
        flex-basis: 100%;
        max-width: 200px;
    }
    
    .wall-grid {
        position: absolute;
        top: 180px;
        left: 15px;
        right: 15px;
        bottom: 20px;
        gap: 12px;
        --gap: 12px;
        padding: 15px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .wall-tile { border-radius: 12px; width: calc((100% - 2 * var(--gap)) / 3); }
    
    .tile-overlay {
        padding: 12px;
    }
    
    .tile-caption {
        font-size: 10px;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    
    .tile-emotion {
        font-size: 8px;
    }
    
    .tile-name {
        font-size: 9px;
    }
    
    /* MOBILE SUBMISSION FORM */
    .wall-submission {
        padding: 0;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .submission-container {
        padding: 25px 20px;
        margin: 15px;
        max-width: none;
        width: calc(100% - 30px);
        min-height: auto;
        max-height: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        position: relative;
    }
    
    .submission-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .submission-prompt {
        font-size: 12px;
        margin-bottom: 25px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    .emotion-selector {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .emotion-option {
        padding: 10px;
        font-size: 10px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .photo-upload {
        padding: 30px 15px;
        min-height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
    }
    
    .upload-text {
        font-size: 13px;
        line-height: 1.4;
        text-align: center;
    }
    
    .photo-preview {
        max-width: 120px;
        max-height: 120px;
    }
    
    .caption-input,
    .name-input {
        font-size: 14px;
        padding: 12px;
        border-radius: 6px;
    }
    
    .caption-input {
        min-height: 70px;
    }
    
    .submit-button {
        padding: 12px 25px;
        font-size: 11px;
        min-height: 44px;
        border-radius: 6px;
    }
    
    .return-button {
        padding: 10px 20px;
        font-size: 10px;
        min-height: 40px;
        border-radius: 6px;
    }
    
    .photo-upload input[type="file"] {
        min-height: 44px;
    }
    
    .submission-success {
        padding: 25px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .success-message {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .success-subtitle {
        font-size: 12px;
        margin-bottom: 30px;
    }
    
    .preview-tile {
        max-width: 250px;
        margin-bottom: 25px;
    }
    
    .preview-overlay {
        padding: 15px;
    }
    
    .preview-caption {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .preview-emotion {
        font-size: 9px;
    }
    
    /* MOBILE SOCIAL CARD GENERATOR */
    .social-card-generator {
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .social-card-container {
        margin: 15px;
        padding: 0;
        max-width: none;
        width: calc(100% - 30px);
        min-height: calc(100vh - 30px);
        border-radius: 15px;
        overflow: hidden;
    }
    
    .social-card-header {
        padding: 20px;
        text-align: center;
        border-radius: 0;
    }
    
    .social-card-header h2 {
        font-size: 18px;
        margin: 0;
    }
    
    .social-card-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 50%;
    }
    
    .social-card-content {
        flex-direction: column;
        padding: 0 20px 20px 20px;
    }
    
    .card-preview-section {
        margin-bottom: 20px;
        order: 1;
    }
    
    #socialCardCanvas {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    .card-controls {
        order: 2;
    }
    
    .text-controls {
        margin-bottom: 15px;
    }
    
    .text-controls input[type="range"] {
        width: 100%;
        min-height: 44px;
    }
    
    .share-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-button {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 48px;
        border-radius: 8px;
        width: 100%;
    }
}

/* Small mobile devices (phones in portrait) */
@media (max-width: 480px) {
    .wall-header {
        padding: 12px 15px 8px 15px;
    }
    
    .wall-title {
        font-size: 20px;
    }
    
    .wall-filters {
        gap: 6px;
        margin-top: 12px;
    }
    
    .emotion-filter {
        font-size: 9px;
        padding: 5px 10px;
        min-height: 30px;
    }
    
    .wall-grid { top: 170px; left: 10px; right: 10px; gap: 10px; --gap: 10px; }
    
    .wall-tile { border-radius: 10px; width: calc((100% - 1 * var(--gap)) / 2); }
    
    .tile-overlay {
        padding: 10px;
    }
    
    .tile-caption {
        font-size: 9px;
    }
    
    .tile-emotion,
    .tile-name {
        font-size: 8px;
    }
    
    .submission-container {
        margin: 10px;
        padding: 20px 15px;
    }
    
    .emotion-selector {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .photo-upload {
        padding: 25px 10px;
        min-height: 80px;
    }
}

/* Improve touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
    .wall-tile {
        /* Remove hover effects on touch devices */
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .wall-tile:active {
        transform: scale(0.98);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    
    .emotion-filter:active {
        transform: scale(0.95);
    }
    
    .photo-upload {
        border-width: 3px;
        padding: 40px 20px;
    }
    
    .photo-upload:active {
        background: rgba(255, 255, 255, 0.8);
        border-color: rgba(136, 136, 136, 0.8);
        transform: scale(0.98);
    }
    
    .upload-text {
        font-size: 15px;
        font-weight: 500;
    }
    
    .submit-button:active,
    .return-button:active {
        transform: scale(0.98);
    }
    
    /* Social Card Generator Mobile */
    .social-card-container {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .social-card-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .card-preview-section {
        min-height: 300px;
    }
    
    #socialCardCanvas {
        max-height: 300px;
    }
    
    .social-card-button {
        width: 100%;
        font-size: 12px;
        padding: 12px 20px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .wall-grid {
        top: 140px;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .wall-tile {
    }
}

/* Better scrolling for mobile Safari */
.wall-grid {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Prevent zoom on form inputs in iOS */
@media (max-width: 768px) {
    .caption-input,
    .name-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Static/Ambient Audio Visualization */
.wall-static {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(0,0,0,0.05) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: static 3s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes static {
    0% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
    100% { transform: translate(0, 0); }
}

/* Info Popup */
.wall-info-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.wall-info-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar Styling */
.popup-content::-webkit-scrollbar {
    width: 12px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin: 10px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.popup-content::-webkit-scrollbar-thumb:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.98);
}

/* Firefox Scrollbar */
.popup-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.wall-info-popup .popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wall-info-popup .popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.wall-info-popup .popup-text {
    padding: 30px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.wall-info-popup .popup-text h2 {
    color: rgba(255, 255, 255, 1);
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 300;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wall-info-popup .popup-text h3 {
    color: rgba(255, 255, 255, 0.9);
    margin: 25px 0 15px 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wall-info-popup .popup-text p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wall-info-popup .popup-text strong {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wall-info-popup .popup-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.wall-info-popup .popup-text li {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Make song title look clickable */
.wall-header h1 {
    transition: color 0.2s ease;
}

.wall-header h1:hover {
          color: #8B7D6B;
  } 