/* Basic reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style-type: none;
}

/* Header Styles */
header {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: rgba(180, 180, 180, 0.8);
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 20px;
}

nav ul li a {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #0091ff; /* Change this color to whatever you prefer */
}

/* Center the form in the middle of the page */
.rsvp-form, .decline-form {
    position: fixed;
    background-image: url('assets/images/parchment-background.jpg'); /* Optional: background image */
    background-position: center; /* Center the background image */
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); /* Center the form both vertically and horizontally */
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    z-index: 1000; /* Ensure it stays on top of other elements */
    font-weight: bold;
    color: #010203;
}

/* General styling for form fields */
.rsvp-form input, .decline-form input, 
.rsvp-form select, .decline-form select, 
.rsvp-form textarea, .decline-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.rsvp-form button, .decline-form button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}
.rsvp-form button:hover, .decline-form button:hover {
    background-color: #0056b3;
}
.accept-btn, .decline-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}
.accept-btn:hover, .decline-btn:hover {
    background-color: #218838;
}
/* Close button at the bottom-right corner */
.close-btn-bottom-right {
    position: absolute;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}
.close-btn-bottom-right:hover {
    background-color: #c82333;
}
/* Style for 'Add Another Name' like a link */
.add-field {
    color: #241ec7; /* Link color */
    text-decoration: underline; /* Underline */
    cursor: pointer; /* Pointer cursor to indicate clickable */
    margin-top: 10px;
}
.add-field:hover {
    color: #0056b3; /* Darker blue on hover */
}

/* Style for 'Add Another Name' like a link */
.add-field, .add-song {
    color: #241ec7; /* Link color */
    text-decoration: underline; /* Underline */
    cursor: pointer; /* Pointer cursor to indicate clickable */
    margin-top: 10px;
}
.add-field:hover, .add-song:hover {
    color: #0056b3; /* Darker blue on hover */
}

/* Quest Window Styling */
.quest-window {
    width: 100vw; /* Full width of the viewport */
    height: 100vh; /* Full height of the viewport */
    aspect-ratio: 1 / 1.4; /* Maintain a consistent aspect ratio */
    min-height: calc(100vh - 80px); /* Ensure the quest window takes the full height minus the header */
    max-height: 85vh; /* Prevent it from exceeding the viewport height */
    background: url('assets/images/Wedding_Invite_2.png') no-repeat center center;
    background-size: contain; /* Ensure the image is fully visible */
    position: relative;
    display: flex;
    overflow: hidden; /* Prevent content overflow */
    padding-top: 120px; /* Optional: add some space between the header and the content */
    box-sizing: border-box; /* Prevent the padding from affecting the width */
}

/* Inner Content Styling */
.quest-content {
    position: absolute;
    top: 10%; /* Offset from the top */
    left: 5%;
    right: 5%;
    text-align: center;
    font-size: 1rem;
}

.quest-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Buttons Styling */
.quest-buttons {
    position: absolute; /* Anchor relative to the quest window */
    top: -10%; /* Fixed distance from the bottom */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Align the center of the button group */
    display: flex;
    justify-content: center;
    gap: 200px; /* Space between buttons */
}

.quest-buttons button {
    width: 10vh; /* Fixed button width */
    height: 3vh; /* Fixed button height */
    border: none;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-image 0.3s ease;
}

.accept-button {
    background-image: url('assets/images/accept-2.png');
}

.accept-button:hover {
    background-image: url('assets/images/accept-hover.png');
}

.decline-button {
    background-image: url('assets/images/decline-2.png');
}

.decline-button:hover {
    background-image: url('assets/images/decline-hover.jpg');
}

/* Mobile Portrait Adjustments */
@media (orientation: portrait) {
    .quest-window {
        width: 70vw; /* Slightly wider for better usability */
        height: auto; /* Let height adjust dynamically */
    }
}

/* Landscape Adjustments */
@media (orientation: landscape) {

    .quest-window {
        width: 90vw; /* Slightly smaller for landscape */
    }
}

/* Mobile-Specific Adjustments */
@media (max-width: 768px) {
    .quest-buttons {
        gap: 5px; /* Reduce button gap */
    }

    .quest-buttons button {
        width: 10vh; /* Fixed button width */
        height: 3vh; /* Fixed button height */
    }
}

/* Safari-Specific Fixes for iPhones */
@supports (-webkit-touch-callout: none) {
    .quest-window {
        max-height: calc(100vh - 20px); /* Use visible height without Safari's address bar */
    }
}

/* Initially hide the warning */
#landscape-warning {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f44336;
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    z-index: 1000;
}

/* For mobile devices */
@media (max-width: 768px) {
    /* Only show the warning for mobile screens */
    #landscape-warning {
        display: block;
    }
}