:root {
    --bg-color: #f7f9fa;
    --text-color: #1f2937;
    --primary-color: #0f172a;
    --accent-color: #3b82f6;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --border-radius: 20px;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, #e0e7ff 0%, transparent 40%),
                      radial-gradient(circle at bottom left, #fff1f2 0%, transparent 40%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--accent-color);
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1rem;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #1e293b;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    margin-top: 10px;
}

#app {
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
}

/* Utils */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 30px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease-out;
}

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

input[type="text"], input[type="date"], input[type="password"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

/* New Organizer Dashboard Styles */
.org-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

.org-top-bar h2 {
    font-size: 1.8rem;
    color: #1e293b;
}

.btn-create-new {
    background-color: #117864;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-create-new:hover {
    background-color: #0e6252;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

@media (min-width: 800px) {
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dash-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.dash-card-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.dash-card-cover {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #e2e8f0;
}

.dash-card-titles h3 {
    font-size: 1.15rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.dash-card-titles p {
    font-size: 0.85rem;
    color: #64748b;
}

.dash-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.dash-action-link {
    font-size: 0.85rem;
    color: #117864;
    font-weight: 600;
    cursor: pointer;
}

.dash-url-section {
    margin-bottom: 20px;
}

.dash-url-section label {
    display: block;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 5px;
}

.dash-url-section a {
    color: #117864;
    font-size: 0.95rem;
    word-break: break-all;
}

.dash-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn-card-action {
    background-color: #117864;
    color: white;
    padding: 12px;
    border-radius: 20px; /* pill shape */
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    transition: background 0.2s;
}

.btn-card-action:hover {
    background-color: #0e6252;
}

.btn-card-action:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Guest View */
.guest-header {
    text-align: center;
    margin-bottom: 30px;
}

.guest-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.guest-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}
.guest-header p {
    color: #6b7280;
    font-size: 1rem;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.4);
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.upload-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Hidden file input */
#file-input {
    display: none;
}

.files-preview {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.file-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}

header.nav-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Guest View Header (Split) */
.guest-split-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .guest-split-header {
        flex-direction: row;
        height: 380px;
    }
}

.guest-split-left {
    flex: 1;
    background-image: url('https://images.unsplash.com/photo-1519741497674-611481863552?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.guest-split-left::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
}

.guest-split-left-content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 20px;
}

.guest-split-left h1 {
    font-size: 2.6rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-family: var(--font-family);
}

.guest-split-left p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.guest-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    background: #ffffff;
}

.guest-split-right p {
    color: #475569;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.5;
    max-width: 80%;
}

.btn-upload-clean {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 12px 36px;
    border-radius: 30px;
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.btn-upload-clean:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Masonry for previews */
.masonry-gallery {
    column-count: 2;
    column-gap: 15px;
    width: 100%;
}

@media (min-width: 768px) {
    .masonry-gallery {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .masonry-gallery {
        column-count: 4;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.masonry-item img, .masonry-item video {
    width: 100%;
    height: auto;
    display: block;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.play-overlay::after {
    content: '';
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent #1e293b;
    margin-left: 4px;
}

/* Media Modal */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.media-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.media-modal-close:hover {
    color: #cbd5e1;
}

.media-modal-content {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-modal-content img, .media-modal-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
