:root {
    --color-dark: #0f0a1a;
    --color-purple-light: #9772fb;
    --color-purple-dark: #4a2b7c;
    --color-gold: #d4af37;
    --color-gold-dark: #9c7a23;
    --color-text: #f1e6ff;
    --color-blue: #acbed3;
    --font-display: 'Cinzel', serif;
    --font-medieval: 'MedievalSharp', cursive;
    --font-body: 'Spectral', serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/fantasy-harbor.webp');
    background-size: cover;
    background-position: center;
    filter: blur(8px) brightness(0.6);
    z-index: -1;
}

/* Fallback for browsers that don't support WebP */
.no-webp .background-container {
    background-image: url('../images/fantasy-harbor.jpg');
}

.background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 43, 124, 0.6), rgba(15, 10, 26, 0.8));
    z-index: 0;
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}

h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--color-gold);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
}

h2 {
    font-family: var(--font-medieval);
    font-size: 1.8rem;
    color: var(--color-purple-light);
    margin-bottom: 1rem;
}

.form-container {
    background: rgba(15, 10, 26, 0.85);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(74, 43, 124, 0.5),
                0 0 10px rgba(212, 175, 55, 0.3);
    border: 1px solid rgba(74, 43, 124, 0.6);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-purple-dark), var(--color-gold), var(--color-purple-dark));
}

.form-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 5;
}

.tab-btn {
    background-color: rgba(15, 10, 26, 0.9);
    color: var(--color-text);
    border: 1px solid var(--color-purple-dark);
    padding: 8px 20px;
    font-family: var(--font-medieval);
    font-size: 1rem;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    outline: none;
}

.tab-btn:hover {
    background-color: rgba(74, 43, 124, 0.6);
    border-color: var(--color-gold);
}

.tab-btn.active {
    background-color: var(--color-purple-dark);
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--color-gold);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.form-content {
    min-height: 800px;
}

iframe#google-form, iframe#dark-google-form {
    width: 100%;
    min-height: 800px;
    background-color: transparent;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-purple-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .form-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
}

/* Form styling */
.form-intro {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.form-intro p {
    margin-bottom: 15px;
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(15, 10, 26, 0.6);
    border-radius: 8px;
    border: 1px solid var(--color-purple-dark);
    position: relative;
}

.form-section:before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.form-section h3 {
    font-family: var(--font-medieval);
    color: var(--color-gold);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.section-description {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.5;
}

.section-description p {
    margin-bottom: 15px;
}

.section-description p:last-child {
    margin-bottom: 0;
}

.section-description ul {
    padding-left: 20px;
    margin: 15px 0;
}

.section-description li {
    margin-bottom: 10px;
    list-style-type: none;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group.required label:after {
    content: none;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-purple-light);
}

.secondary-label {
    font-size: 0.95rem;
    margin-top: -5px;
    margin-bottom: 10px;
    color: rgba(241, 230, 255, 0.8);
    font-style: italic;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="number"],
.input-group input[type="date"],
.input-group input[type="time"],
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 10, 26, 0.7);
    border: 1px solid var(--color-purple-dark);
    border-radius: 4px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.input-group.checkbox {
    display: flex;
    align-items: flex-start;
}

.input-group.checkbox input {
    margin-top: 5px;
    margin-right: 10px;
    min-width: 20px;
    height: 20px;
    appearance: none;
    background-color: rgba(15, 10, 26, 0.7);
    border: 1px solid var(--color-purple-dark);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.input-group.checkbox input:checked {
    background-color: var(--color-purple-dark);
    border-color: var(--color-gold);
}

.input-group.checkbox input:checked:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-gold);
    font-size: 14px;
}

.input-group.checkbox label {
    display: inline;
    margin-left: 5px;
    font-weight: normal;
    line-height: 1.5;
    color: var(--color-text);
    flex: 1;
}

/* Add new rule for top-level required fields */
.input-group.required > label:first-child:after {
    content: '*';
    color: var(--color-gold);
    margin-left: 5px;
}

/* Ensure asterisk doesn't appear on checkbox or radio labels */
.input-group.checkbox label:after,
.radio-option label:after {
    content: none;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 43, 124, 0.6);
}

.navigation-button {
    background-color: var(--color-purple-dark);
    color: var(--color-text);
    border: 1px solid var(--color-gold);
    padding: 10px 20px;
    font-family: var(--font-medieval);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
    outline: none;
    min-width: 120px;
    text-align: center;
}

.navigation-button:hover {
    background-color: var(--color-purple-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.navigation-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-indicator {
    color: var(--color-gold);
    font-family: var(--font-medieval);
    font-size: 1rem;
}

/* Radio button styles */
.radio-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    position: relative;
    width: 100%;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option label {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(15, 10, 26, 0.7);
    border: 1px solid var(--color-purple-dark);
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + label {
    background: var(--color-purple-dark);
    border-color: var(--color-gold);
    color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.radio-option label:before {
    content: '';
    width: 16px;
    height: 16px;
    background: rgba(15, 10, 26, 0.7);
    border: 1px solid var(--color-purple-dark);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + label:before {
    background: var(--color-gold);
    border-color: var(--color-gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Add style for "Other" text input in radio options */
.radio-option input[type="text"] {
    margin-top: 8px;
    margin-left: 26px;
    width: calc(100% - 26px);
}

/* Hide form sections for multi-page form */
.form-section[data-page]:not([data-page="1"]) {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-indicator {
        order: -1;
    }
    
    .form-section {
        padding: 15px;
    }
}

/* Add styles for checkbox groups and error messages */

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

.checkbox-group .input-group.checkbox {
    margin-bottom: 0;
    width: 100%;
}

/* Error styles */
.input-group input.invalid,
.input-group textarea.invalid,
.input-group select.invalid,
.radio-options.invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5) !important;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 5px;
}

.error-summary {
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-summary h4 {
    color: #ff6b6b;
    margin-top: 0;
    margin-bottom: 10px;
}

.error-summary ul {
    margin: 0;
    padding-left: 20px;
}

.submission-error {
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Success message */
.success-message {
    background-color: rgba(111, 207, 151, 0.1);
    border: 1px solid #6fcf97;
    color: #6fcf97;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.success-message h3 {
    color: #6fcf97;
    font-family: var(--font-medieval);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* Back button styles */
.navigation-button.back-button {
    background-color: rgba(15, 10, 26, 0.7);
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
    .checkbox-group {
        gap: 5px;
    }
    
    .checkbox-group .input-group.checkbox {
        min-width: auto;
    }
}

.preference-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 2px solid var(--color-purple-dark);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.preference-table th, .preference-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid rgba(74, 43, 124, 0.4);
}

.preference-table th {
    background-color: rgba(74, 43, 124, 0.6);
    font-weight: 600;
    color: var(--color-gold);
    padding: 10px 8px;
    font-family: var(--font-medieval);
    font-size: 0.9rem;
    line-height: 1.3;
}

.preference-table td:first-child {
    text-align: left;
    font-weight: 600;
    min-width: 150px;
    background-color: rgba(74, 43, 124, 0.2);
    color: var(--color-purple-light);
}

.preference-table input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background-color: rgba(15, 10, 26, 0.7);
    border: 2px solid var(--color-purple-dark);
    border-radius: 50%;
    margin: 0 auto;
    display: block;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.preference-table input[type="radio"]:checked {
    background-color: rgba(74, 43, 124, 0.4);
    border-color: var(--color-gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.preference-table input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--color-gold);
    border-radius: 50%;
}

.preference-table input[type="radio"]:hover {
    border-color: var(--color-purple-light);
    transform: scale(1.05);
}

.preference-table tr:hover {
    background-color: rgba(74, 43, 124, 0.2);
}

@media (max-width: 768px) {
    .preference-table {
        font-size: 0.9rem;
    }
    
    .preference-table th, .preference-table td {
        padding: 6px 4px;
    }
    
    .preference-table td:first-child {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .preference-table {
        font-size: 0.8rem;
    }
    
    .preference-table td:first-child {
        min-width: 80px;
    }
    
    /* Add responsive styles for preference tables with text in headers */
    .preference-table th {
        font-size: 0.75rem;
        padding: 5px 2px;
        word-break: break-word;
    }
}

.logo-container {
    max-width: 600px;
    margin: 0 auto 15px;
}

.logo-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

/* Update responsive rules for the logo */
@media (max-width: 768px) {
    .logo-container {
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        max-width: 280px;
    }
}

/* Save & Restore Button Styles */
.save-button {
    background-color: #896c39;
    margin-right: 10px;
}

.save-button:hover {
    background-color: #a18449;
}

.restore-prompt {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: rgba(28, 24, 33, 0.8);
    border: 1px solid #896c39;
    border-radius: 5px;
}

.restore-prompt p {
    margin: 0;
    font-size: 0.95rem;
}

.restore-prompt button {
    background-color: #896c39;
    color: white;
    border: none;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Spectral', serif;
}

.restore-prompt button:hover {
    background-color: #a18449;
}

/* Save Notification */
.save-notification {
    position: fixed;
    top: 20px;
    right: -300px;
    width: 280px;
    padding: 15px;
    background-color: rgba(28, 24, 33, 0.95);
    color: white;
    border-left: 4px solid #896c39;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    font-family: 'Spectral', serif;
    border-radius: 3px;
}

.save-notification.show {
    right: 20px;
}

/* Error highlighting */
.input-group.error {
    animation: shake 0.5s;
    border-left: 3px solid #e53935;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Form Status Messages */
.form-status-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
    font-family: var(--font-body);
}

.form-status-message.submitting {
    background-color: rgba(74, 43, 124, 0.2);
    border: 1px solid var(--color-purple-dark);
    color: var(--color-purple-light);
}

.form-status-message.error {
    background-color: rgba(229, 57, 53, 0.1);
    border: 1px solid #e53935;
    color: #ff8a80;
}

.form-status-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #a5d6a7;
}

.form-status-message p {
    margin: 5px 0;
}

.form-status-message p:first-child {
    font-weight: 600;
}

/* Update submission success styles to match */
.submission-success {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    color: #a5d6a7;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.submission-success h3 {
    color: #4caf50;
    font-family: var(--font-medieval);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

/* Rating Scale - Google Forms Style */
.rating-scale {
    margin-top: 15px;
    width: 100%;
}

.rating-headers {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-start {
    flex: 1;
    text-align: right;
    padding-right: 10px;
    font-size: 0.95rem;
    color: var(--color-text);
}

.rating-numbers {
    display: flex;
    justify-content: space-between;
    width: 250px;
    margin: 0 10px;
}

.rating-numbers span {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--color-gold);
}

.rating-end {
    flex: 1;
    text-align: left;
    padding-left: 10px;
    font-size: 0.95rem;
    color: var(--color-text);
}

.rating-options {
    display: flex;
    justify-content: space-between;
    width: 250px;
    margin: 0 auto;
}

.rating-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background-color: rgba(15, 10, 26, 0.7);
    border: 2px solid var(--color-purple-dark);
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.rating-options input[type="radio"]:checked {
    background-color: rgba(74, 43, 124, 0.4);
    border-color: var(--color-gold);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.rating-options input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: var(--color-gold);
    border-radius: 50%;
}

.rating-options input[type="radio"]:hover {
    border-color: var(--color-purple-light);
    transform: scale(1.05);
}

/* Responsive styling for rating scale */
@media (max-width: 768px) {
    .rating-headers {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rating-start, .rating-end {
        text-align: left;
        padding: 5px 0;
    }
    
    .rating-numbers, .rating-options {
        width: 100%;
        margin: 5px 0;
    }
}

/* Add edit mode styling */
.edit-mode-message {
    background-color: rgba(151, 111, 207, 0.1);
    border: 1px solid #976fcf;
    color: #c4b3e6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.edit-mode-message p {
    margin: 0;
}

/* Update success message for edit links */
.submission-success input[type="text"] {
    background: rgba(15, 10, 26, 0.8);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.submission-success input[type="text"]:hover,
.submission-success input[type="text"]:focus {
    background: rgba(15, 10, 26, 0.9);
    border-color: var(--color-purple-light);
    outline: none;
} 
