* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* Zarf Ekranı */
#envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f5f1ed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 0.5s ease;
}

#envelope-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#envelope-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.click-hint {
    position: absolute;
    bottom: 50px;
    font-size: 18px;
    color: #8b7355;
    animation: pulse 2s infinite;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Screen */
#main-screen {
    display: none;
}

#main-screen.visible {
    display: block;
}

/* Sound Control */
.sound-control {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.sound-control.visible {
    display: flex;
}

.sound-control:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 64px;
    margin-bottom: 10px;
}

.names {
    font-family: 'Great Vibes', cursive;
    font-size: 80px;
    margin: 20px 0;
}

.date-info {
    font-size: 20px;
    font-weight: 300;
}

/* Details Section */
.details-section {
    background: #f9f7f4;
    padding: 80px 20px;
}

.details-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    color: #8b7355;
    margin-bottom: 60px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.event-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.event-card h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 36px;
    color: #8b7355;
    margin-bottom: 20px;
}

.event-card .date {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
}

.event-card p {
    margin: 10px 0;
    color: #555;
}

.map-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #8b7355;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.map-button:hover {
    background: #6d5a43;
}

/* Memory Section */
.memory-section {
    background: #fff;
    padding: 80px 20px;
}

.memory-container {
    max-width: 900px;
    margin: 0 auto;
}

.memory-card {
    background: #f9f7f4;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
}

.memory-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e8dfd6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.memory-title {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    color: #8b7355;
    margin-bottom: 10px;
}

.memory-subtitle {
    color: #999;
    margin-bottom: 30px;
}

.divider {
    height: 1px;
    background: #d0d0d0;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: 'ANI BIRAKMAK İÇİN DOKUNUN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f9f7f4;
    padding: 0 20px;
    color: #999;
    font-size: 12px;
    letter-spacing: 2px;
}

.expand-btn {
    background: none;
    border: none;
    color: #8b7355;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.expand-btn:hover {
    transform: scale(1.2);
}

.memory-form {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, margin-top 0.5s ease-out;
    pointer-events: none;
    margin-top: 0;
}

.memory-form.active {
    max-height: 3000px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 30px;
}

.media-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.media-tab {
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.media-tab.active {
    background: #8b7355;
    color: #fff;
    border-color: #8b7355;
}

.upload-section {
    display: none;
    text-align: center;
}

.upload-section.active {
    display: block;
}

/* Capture zone (büyük tıklanabilir alan) */
.capture-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed #d0d0d0;
    border-radius: 15px;
    padding: 40px 20px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.capture-zone:hover {
    border-color: #8b7355;
    background: #f5efe8;
}

.capture-zone.recording {
    border-color: #e74c3c;
    background: #fdf0ef;
    animation: pulse-border 1s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #e74c3c; }
    50% { border-color: #ffaaaa; }
}

.capture-zone-icon {
    font-size: 52px;
    line-height: 1;
}

.capture-zone-title {
    font-family: 'Great Vibes', cursive;
    font-size: 30px;
    color: #8b7355;
}

.capture-zone-sub {
    color: #999;
    font-size: 13px;
}

.audio-timer {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #e74c3c;
}

.audio-timer.hidden { display: none; }

.or-divider {
    margin: 14px 0;
    color: #bbb;
    font-size: 12px;
    letter-spacing: 2px;
}

.format-hint {
    margin-top: 10px;
    font-size: 11px;
    color: #bbb;
}

.upload-btn {
    background: transparent;
    border: 2px solid #8b7355;
    color: #8b7355;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #8b7355;
    color: #fff;
}

/* Media grid - kartlar */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin: 24px 0 8px;
    text-align: left;
}

.media-grid:empty {
    display: none;
}

.media-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.media-card img,
.media-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-card .audio-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    width: 100%;
    height: 100%;
    background: #f0ece8;
}

.media-card .audio-card-inner span {
    font-size: 30px;
}

.media-card .audio-card-inner small {
    font-size: 10px;
    color: #888;
    text-align: center;
    word-break: break-all;
}

.media-card .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Progress overlay on each card */
.media-card .progress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    color: #fff;
    font-size: 11px;
}

.media-card .progress-overlay .prog-bar-wrap {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.media-card .progress-overlay .prog-bar-fill {
    height: 100%;
    background: #8b7355;
    border-radius: 3px;
    transition: width 0.2s;
}

.media-card .card-done-badge {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.media-card .card-error-badge {
    position: absolute;
    inset: 0;
    background: rgba(180,0,0,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    padding: 6px;
    text-align: center;
}

.name-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin: 16px 0;
    font-family: 'Poppins', sans-serif;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* RSVP Section */
.rsvp-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
}

.rsvp-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('rsvp.jpeg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.rsvp-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
}

.rsvp-container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.rsvp-title {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    text-align: center;
    color: #8b7355;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #8b7355;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.submit-btn:hover {
    background: #6d5a43;
}

/* Responsive */
@media (max-width: 768px) {
    .names { font-size: 56px; }
    .hero-content h1 { font-size: 40px; }
    .rsvp-container, .memory-card { padding: 30px 20px; }
}
