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

body {
    font-family: 'Libre Baskerville', serif;
    min-height: 100vh;
    background: linear-gradient(180deg, #E8F5F3 0%, #D0EBE7 50%, #B8E0D8 100%);
    color: #2D3436;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-attachment: fixed;
}

.container {
    max-width: 550px;
    width: 100%;
}

.decorative-border {
    border: 3px double #C9A227;
    border-radius: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 0 0 1px #D4AF37,
        0 0 0 3px #C9A227,
        0 10px 40px rgba(0, 121, 107, 0.15);
}

.inner-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 40px 35px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #00796B;
}

.header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #00796B;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header .subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #00695C;
    font-style: italic;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header .subtitle-logo {
    height: 60px;
    width: auto;
}

.school-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.school-badge .logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.school-badge .anniversary-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
    color: #C9A227;
}

.divider::before,
.divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, #C9A227, transparent);
}

.divider .star {
    font-size: 1rem;
}

.top-logo {
    text-align: center;
    margin: 5px 0;
}

.top-logo .school-emblem {
    width: 80px;
    height: auto;
}

.icon-nav {
    text-align: center;
    margin: 5px 0;
}

.icon-nav .icon-menu {
    max-width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.search-section {
    text-align: center;
}

.search-section.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: blur(3px);
}

.search-section.disabled::after {
    content: '請先填寫貴賓簽到表單';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 121, 107, 0.9);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 700;
    z-index: 10;
    width: 80%;
    text-align: center;
}

.search-section.hidden {
    display: none;
}

.search-label {
    font-size: 1rem;
    color: #00796B;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-weight: 700;
    display: block;
    text-align: center;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.search-input {
    width: 100%;
    padding: 16px 25px;
    padding-right: 50px;
    font-size: 1rem;
    border: 2px solid #B2DFDB;
    border-radius: 30px;
    background: #FAFAFA;
    color: #2D3436;
    transition: all 0.3s ease;
    font-family: 'Libre Baskerville', serif;
    box-shadow: inset 0 2px 4px rgba(0, 121, 107, 0.08);
}

.search-input::placeholder {
    color: #90A4AE;
    font-style: italic;
}

.search-input:focus {
    outline: none;
    border-color: #00796B;
    background: #fff;
    box-shadow: 
        inset 0 2px 4px rgba(0, 121, 107, 0.08),
        0 0 15px rgba(0, 121, 107, 0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #00796B;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-hint {
    text-align: center;
    color: #00695C;
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Registration Form */
.registration-section {
    background: #E0F2F1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #B2DFDB;
}

.registration-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #00796B;
    text-align: center;
    margin-bottom: 18px;
    font-weight: 500;
}

.privacy-notice {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.checkin-entry {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #B2DFDB;
    display: none;
}

.checkin-label {
    font-size: 0.85rem;
    color: #00695C;
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.hidden-field {
    display: none;
}

.visible-field {
    display: block;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 1.5rem;
    color: #00695C;
    margin-bottom: 5px;
    font-weight: 700;
    line-height: 1.3;
}

.form-group .optional {
    font-weight: 400;
    font-size: 1.3rem;
    color: #90A4AE;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.9rem;
    border: 1px solid #B2DFDB;
    border-radius: 8px;
    background: #fff;
    color: #2D3436;
    font-family: 'Libre Baskerville', serif;
    transition: all 0.3s ease;
}

.identity-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.9rem;
    border: 1px solid #B2DFDB;
    border-radius: 8px;
    background: #fff;
    color: #2D3436;
    font-family: 'Libre Baskerville', serif;
    transition: all 0.3s ease;
    cursor: pointer;
}

.identity-select:focus {
    outline: none;
    border-color: #00796B;
    box-shadow: 0 0 10px rgba(0, 121, 107, 0.2);
}

.form-group label {
    display: block;
    font-size: 1.5rem;
    color: #00695C;
    margin-bottom: 5px;
    font-weight: 700;
    line-height: 1.3;
}

.form-group input::placeholder {
    color: #90A4AE;
}

.form-group input:focus {
    outline: none;
    border-color: #00796B;
    box-shadow: 0 0 10px rgba(0, 121, 107, 0.2);
}

.mobile-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #B2DFDB;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 44px;
}

.mobile-input-wrapper:focus-within {
    border-color: #00796B;
    box-shadow: 0 0 10px rgba(0, 121, 107, 0.2);
}

.mobile-input-wrapper .area-code {
    background: #E0F2F1;
    color: #00796B;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border-right: 1px solid #B2DFDB;
    min-width: 45px;
    text-align: center;
}

.mobile-input-wrapper input {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 12px 12px !important;
    height: 44px;
}

.mobile-input-wrapper input:focus {
    box-shadow: none !important;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-wrapper input {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.9rem;
    height: 44px;
}

.suggestions-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #B2DFDB;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #E8F5F3;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #E8F5F3;
    color: #00796B;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.9rem;
    height: 44px;
}

.submit-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    background: #00796B;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Libre Baskerville', serif;
    transition: all 0.3s ease;
    height: auto;
    line-height: 1;
}

.submit-btn:hover {
    background: #00695C;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
}

.form-success {
    text-align: center;
    padding: 20px;
    color: #00796B;
    font-weight: 700;
}

.form-success-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.results {
    margin-top: 25px;
}

.result-card {
    background: #E0F2F1;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 12px;
    border: 1px solid #B2DFDB;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.1);
    animation: slideIn 0.3s ease;
}

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

.result-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted #80CBC4;
}

.result-field:last-child {
    border-bottom: none;
}

.result-label {
    color: #00695C;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 400;
}

.result-value {
    color: #00796B;
    font-weight: 700;
    font-size: 1.05rem;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #607D8B;
}

.no-results-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-results p {
    font-style: italic;
}

/* Seating Plan Section */
.seating-plan-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #00796B;
}

.seating-plan-toggle {
    text-align: center;
    margin-bottom: 15px;
}

.seating-plan-image-container {
    display: none;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #B2DFDB;
}

.seating-plan-image-container.show {
    display: block;
}

.seating-plan-image {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    display: block;
}

.table-highlight-info {
    background: #E0F2F1;
    border: 2px solid #00796B;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.table-highlight-info.show {
    display: block;
}

.table-highlight-info h4 {
    color: #00796B;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.table-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(0, 121, 107, 0.8);
    border: 2px solid #00796B;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.table-circle:hover {
    background: #C9A227;
    transform: scale(1.2);
}

.table-circle.highlight {
    background: #C9A227;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.seating-plan-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.database-toggle {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #00796B;
}

.download-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #00796B;
}

.download-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #00796B;
    margin-bottom: 15px;
    font-weight: 500;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: block;
    background: #00796B;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Libre Baskerville', serif;
    letter-spacing: 1px;
    padding: 15px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #00695C;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
}

.toggle-btn {
    background: #00796B;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    font-family: 'Libre Baskerville', serif;
    letter-spacing: 1px;
    padding: 16px 32px;
    border-radius: 25px;
}

.toggle-btn:hover {
    background: #00695C;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
}

.toggle-btn:disabled {
    background: #B0BEC5;
    cursor: not-allowed;
    opacity: 0.6;
}

.full-database {
    margin-top: 20px;
    display: none;
}

.full-database.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.database-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.7rem;
    background: #FAFAFA;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #B2DFDB;
}

.database-table th,
.database-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #E0F2F1;
}

.database-table th {
    background: #00796B;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.4rem;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.database-table td {
    color: #2D3436;
}

.database-table tr:last-child td {
    border-bottom: none;
}

.database-table tr:hover td {
    background: #E0F2F1;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 1.3rem;
    }

    .header .subtitle {
        font-size: 0.95rem;
    }

    .inner-content {
        padding: 20px 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .registration-section {
        padding: 15px;
    }

    .form-group input {
        font-size: 0.85rem;
    }

    .mobile-input-wrapper {
        height: 42px;
    }

    .mobile-input-wrapper input {
        height: 42px;
    }

    .submit-btn {
        height: 42px;
    }

    .database-table {
        font-size: 0.7rem;
    }

    .database-table th,
    .database-table td {
        padding: 8px 6px;
    }
}
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid #B2DFDB;
    background: #E8F5F3;
}

.footer a {
    text-decoration: none;
    color: #00796B;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
}

.footer a:hover {
    color: #00695C;
}

.footer-logo {
    height: 24px;
    width: auto;
}

.footer span {
    font-weight: 500;
}

.header-footer {
    text-align: center;
    padding: 10px 0;
    margin-top: 5px;
}

.header-footer a {
    text-decoration: none;
    color: #90A4AE;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.7rem;
}

.header-footer a:hover {
    color: #00796B;
}

.header-footer .footer-logo {
    height: 16px;
    width: auto;
}

.top-footer {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1000;
}

.top-footer a {
    text-decoration: none;
    color: #00796B;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.top-footer a:hover {
    color: #00695C;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 121, 107, 0.2);
}

.top-footer .footer-logo {
    height: 18px;
    width: auto;
}

.top-footer span {
    font-weight: 500;
}

.bottom-footer {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    width: 100%;
}

.bottom-footer a {
    text-decoration: none;
    color: #00796B;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.bottom-footer a:hover {
    color: #00695C;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 121, 107, 0.2);
}

.bottom-footer .footer-logo {
    height: 20px;
    width: auto;
}

.bottom-footer span {
    font-weight: 500;
}

/* Access Code Gate Styles */
.access-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #E8F5F3 0%, #D0EBE7 50%, #B8E0D8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.access-gate-container {
    background: rgba(255, 255, 255, 0.95);
    border: 3px double #C9A227;
    border-radius: 12px;
    padding: 40px 35px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        0 0 0 1px #D4AF37,
        0 0 0 3px #C9A227,
        0 10px 40px rgba(0, 121, 107, 0.15);
}

.access-gate-logo {
    margin-bottom: 20px;
}

.access-gate-logo img {
    width: 80px;
    height: auto;
}

.access-gate-container h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #00796B;
    margin-bottom: 25px;
    line-height: 1.4;
}

.access-gate-form p {
    font-size: 0.9rem;
    color: #00695C;
    margin-bottom: 15px;
}

.access-gate-form input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.2rem;
    border: 2px solid #B2DFDB;
    border-radius: 8px;
    text-align: center;
    letter-spacing: 4px;
    font-family: 'Libre Baskerville', serif;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.access-gate-form input:focus {
    outline: none;
    border-color: #00796B;
    box-shadow: 0 0 10px rgba(0, 121, 107, 0.2);
}

.access-submit-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    background: #00796B;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Libre Baskerville', serif;
    transition: all 0.3s ease;
}

.access-submit-btn:hover {
    background: #00695C;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
}

.access-error {
    color: #D32F2F;
    font-size: 0.85rem;
    margin-top: 10px;
    min-height: 20px;
}

.main-content {
    width: 100%;
    max-width: 550px;
    display: flex;
    justify-content: center;
}

/* Download Section Styles */
.download-section {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #00796B;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Libre Baskerville', serif;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #00695C;
    box-shadow: 0 4px 15px rgba(0, 121, 107, 0.3);
}