:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-bg: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #ddd;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-x: hidden;
}

@supports (padding-top: env(safe-area-inset-top)) {
    :root {
        --safe-area-inset-top: env(safe-area-inset-top);
        --safe-area-inset-bottom: env(safe-area-inset-bottom);
    }
    
    .app-header {
        padding-top: calc(20px + var(--safe-area-inset-top));
        min-height: calc(60px + var(--safe-area-inset-top));
    }
}

.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem 1rem;
    position: relative;
    width: 100%;
}

.header-text {
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.header-text h1 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
}

.header-text p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.install-button {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

.install-button {
    display: none; /* Hidden by default, shown via JavaScript */
    background-color: #4CAF50; /* Green color for better visibility */
    color: white;
    border: none;
    border-radius: 20px; /* More rounded corners */
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.install-button.visible {
    display: flex; /* Use flex to center the icon and text */
}

.install-button:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.install-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.install-button:hover {
    background-color: #2980b9;
}

.install-button i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-text {
        text-align: center;
    }
    
    .install-button {
        width: 100%;
        justify-content: center;
    }
}

.app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tabs {
    display: flex;
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: white;
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

.content {
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 1200px;
}

.tab-content.active {
    display: block;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.iframe-container {
    width: 100%;
    height: 80vh;
    min-height: 300px; /* Ensure minimum height */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
    background: white;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.upload-info {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    line-height: 1.6;
}

.upload-info p {
    margin: 0;
    color: #495057;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
}

/* File input container */
.file-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

#browseFilesBtn {
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#browseFilesBtn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#browseFilesBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#browseFilesBtn i {
    font-size: 1.1em;
}

#fileCount {
    color: #666;
    font-size: 0.9em;
}

/* File preview */
.file-preview {
    margin-top: 1rem;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    color: #666;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.file-size {
    color: #666;
    font-size: 0.8em;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.remove-file {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.remove-file:hover {
    background: #ffebee;
}

.form-group input[type="text"],
.form-group input[type="file"] {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"] {
    padding: 0.5rem;
}

.file-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.privacy-info {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
}

.privacy-info h3 {
    margin-top: 0;
    color: #495057;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.privacy-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    text-align: center;
}

.lightbox-content img {
    max-height: 80vh;
    max-width: 100%;
    border-radius: 4px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

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

.lightbox-caption {
    color: #fff;
    padding: 10px 0;
    text-align: center;
}

/* Thumbnail Gallery */
.portfolio-preview {
    margin-bottom: 1.5rem;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}

.thumbnail {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    background-color: #f0f0f0;
}

.thumbnail:hover {
    transform: scale(1.03);
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.loading-thumbnails {
    text-align: center;
    padding: 1rem;
    color: #666;
    grid-column: 1 / -1;
}

/* Media Gallery Styles */
.media-gallery {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.media-gallery h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}

.media-gallery h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.vimeo-video-container {
  width: 100%;
  max-width: 420px;
  height: 700px;
  max-height: 80vh;
  margin: 0 auto 24px auto;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.vimeo-video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  background: #000;
  display: block;
}

/* Cupsong Link */
.cupsong-link {
    margin-bottom: 1.5rem;
    text-align: center;
}

.cupsong-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4a6fa5, #3a5a8a);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.cupsong-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #3a5a8a, #2c4466);
}

.cupsong-button i {
    font-size: 1rem;
}

.media-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.media-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.vimeo-embed {
    width: 100%;
    margin: 0 auto 24px auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: block;
    overflow: visible;
}

.vimeo-embed iframe {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    border-radius: 10px;
    background: #000;
    display: block;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.portfolio-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.portfolio-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-link i:first-child {
    font-size: 1.2rem;
}

.portfolio-link i:last-child {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Loading state */
.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .media-gallery {
        padding: 1rem;
    }
    
    .media-section {
        padding: 1rem;
    }
    
    .portfolio-link {
        flex-direction: column;
        padding: 1.5rem 1rem;
    }
    
    .portfolio-link span {
        margin: 0.5rem 0;
    }
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Status Messages */
#uploadStatus {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    z-index: 1000;
    pointer-events: none;
}

.status-message {
    padding: 16px 25px;
    border-radius: 8px;
    color: white !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    margin: 10px;
    border: none;
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 10000;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes bounceIn {
    0% { transform: translateY(20px) scale(0.95); opacity: 0; }
    50% { transform: translateY(-5px) scale(1.02); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.status-message i {
    position: absolute;
    left: 14px;
    font-size: 22px;
    opacity: 1;
    z-index: 2;
    color: white;
}

.status-message.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-left: none;
    color: white !important;
}

.status-message.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left: none;
}

.status-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 5px;
    line-height: 1;
}

.status-close:hover {
    opacity: 1;
}

/* Progress bar for upload status */
.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    overflow: hidden;
}

.upload-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress 2.5s infinite linear;
}

@keyframes progress {
    0% { width: 0%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0%; left: 100%; }
}

/* Animation for new messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.btn:hover {
    background-color: #2980b9;
}

.btn i {
    font-size: 1.1rem;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background-color: #f8f9fa;
}

.status-message.info {
    background-color: #e7f5ff;
    color: #1864ab;
    border-color: #74c0fc;
}

/* Removed duplicate .status-message.success rule */

.status-message.error {
    background-color: #fff5f5;
    color: #c92a2a;
    border-color: #ffa8a8;
}

.status-message::-webkit-scrollbar {
    width: 8px;
}

.status-message::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.status-message::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.status-message::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

.status-message.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: var(--success-color);
}

.status-message.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    display: block;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .content {
        padding: 1rem 0.8rem;
    }
    
    .upload-container {
        padding: 1rem;
    }
}

/* Add some visual feedback for form interactions */
input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 1rem;
    transition: all 0.2s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e0e0e0;
}

/* Add a subtle animation for the active tab */
.tab-btn:active {
    transform: scale(0.98);
}

/* Gallery Grid and Preview Styles */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.gallery-day {
    width: calc(33.333% - 2rem);
    max-width: 200px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.gallery-day:hover {
    transform: translateY(-3px);
}

.gallery-preview {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-day:hover .gallery-preview img {
    transform: scale(1.05);
}

.gallery-overlay {

/* --- Responsive Vimeo Embed for Mobile --- */
@media (max-width: 600px) {
  .vimeo-embed {
    max-width: 100vw;
  }
  .vimeo-embed > div[style*="padding"] {
    padding-top: 120% !important;
    max-width: 100vw;
  }
  .vimeo-embed iframe {
    max-height: 60vh;
  }
}

    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1.5rem 0.75rem 0.75rem;
    text-align: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.gallery-overlay h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.gallery-overlay p {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .gallery-day {
        width: calc(50% - 1rem);
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .gallery-day {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}
