/* ============================================
   REGISTER MODAL
   ============================================ */
.register-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.register-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal {
    overflow-y: auto;
    padding: 20px 16px;
}

.info-modal.show {
    align-items: flex-start;
}

.register-modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    border: 2px solid rgba(200 217 187, 0.3);
}

.register-modal-content h2 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.register-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.register-modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.register-modal-body {
    color: #e0e0e0;
}

.register-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.register-step:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.step-number {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, #7a151a, #d81f26);
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(55 212 138, 0.4);
}

.step-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.step-content ul {
    margin-left: 20px;
    line-height: 1.8;
}

.step-content ul li {
    margin-bottom: 8px;
    color: #e0e0e0;
}

.step-content strong {
    color: #f1d77e;
    font-weight: 600;
}

.register-note {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    color: #f1d77e;
    line-height: 1.6;
}

.register-note strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ============================================
   SERVER INFO MODAL
   ============================================ */
.info-modal-content {
    max-width: 1180px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
    padding: 58px 72px 64px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    margin: 0 auto;
}

.info-modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/modal-parchment-frame.png') center center / 109% 108% no-repeat;
    z-index: 0;
    pointer-events: none;
}

.info-modal-content > * {
    position: relative;
    z-index: 1;
}

.info-modal-content h2 {
    color: #5f3619;
    text-shadow: 0 1px 0 rgba(255, 248, 229, 0.75);
    letter-spacing: 1.4px;
    margin-bottom: 18px;
    flex: 0 0 auto;
}

.info-modal-content .register-modal-close {
    top: 18px;
    right: 24px;
    color: #6e4120;
    text-shadow: 0 1px 0 rgba(255, 248, 229, 0.72);
}

.info-modal-content .register-modal-close:hover {
    color: #8c2718;
}

.dropbox-modal-content {
    max-width: 1040px;
}

.events-modal-content {
    max-width: 1260px;
}

.info-modal-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 2px 4px;
    margin: 0;
    scrollbar-gutter: stable both-edges;
}

.info-modal-panel {
    min-height: 0;
    align-self: start;
}

.info-table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    --paper-grid-strong: rgba(112, 71, 30, 0.42);
    --paper-grid-medium: rgba(112, 71, 30, 0.28);
    --paper-grid-soft: rgba(112, 71, 30, 0.22);
}

.info-table thead th {
    background: transparent;
    color: #5d3215;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.7px;
    font-size: 1.02rem;
    padding: 8px 6px 12px;
    border: none;
    border-bottom: 2px solid var(--paper-grid-strong);
    text-shadow:
        0 1px 0 rgba(255, 248, 229, 0.86),
        0 0 1px rgba(82, 45, 15, 0.2);
}

.info-table td {
    border: none;
    border-bottom: 1.5px solid var(--paper-grid-medium);
    padding: 10px 10px;
    color: #4b2c12;
    background: transparent;
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.24;
    font-weight: 600;
    text-shadow:
        0 1px 0 rgba(255, 251, 241, 0.62),
        0 0 1px rgba(80, 47, 17, 0.1);
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: inset 0 -1px 0 rgba(255, 247, 228, 0.18);
}

.info-table td + td,
.info-table th + th {
    border-left: 1.5px solid var(--paper-grid-soft);
}

.info-table tbody tr:nth-child(odd) td {
    background: linear-gradient(180deg, rgba(255, 249, 234, 0.08), rgba(173, 120, 58, 0.03));
}

.info-table td:first-child {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: 40%;
    color: #4a280f;
    text-shadow:
        0 1px 0 rgba(255, 249, 235, 0.88),
        0 0 1px rgba(73, 39, 12, 0.18);
}

.info-table td:last-child {
    font-weight: 700;
    color: #573117;
}

.info-table tbody tr.info-table-emphasis td:last-child {
    background: transparent;
    color: #9d2f2d;
    font-weight: 900;
}

.info-table tbody tr.info-table-note td {
    background: transparent;
    color: #9d2f2d;
    font-weight: 900;
}

.info-table tbody tr:last-child td {
    border-bottom-color: transparent;
}

.single-table-layout {
    grid-template-columns: 1fr;
}

.events-table-wrap {
    overflow-x: auto;
}

.events-info-table {
    min-width: 1080px;
    table-layout: fixed;
}

.events-info-table th {
    white-space: nowrap;
}

.events-info-table thead th {
    text-align: center;
}

.events-info-table td {
    text-align: left;
    vertical-align: top;
}

.events-info-table td:first-child {
    width: 17%;
    text-transform: none;
    letter-spacing: 0;
}

.events-info-table td:nth-child(2) {
    width: 23%;
    text-align: center;
}

.events-info-table td:nth-child(3) {
    width: 24%;
}

.events-info-table td:nth-child(4) {
    width: 36%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .register-modal {
        overflow-y: auto;
        padding: max(10px, env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    }

    .register-modal.show {
        align-items: flex-start;
    }

    .register-modal-content {
        padding: 26px 16px 18px;
        width: 100%;
        max-height: none;
        border-radius: 18px;
        margin: 0 auto;
    }
    
    .register-modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 22px;
        padding-right: 28px;
    }

    .info-modal-content {
        padding: 46px 34px 36px;
        max-height: none;
    }

    .info-modal-content::before {
        background-size: 128% 110%;
    }

    .register-modal-close {
        top: 12px;
        right: 14px;
        font-size: 32px;
    }
    
    .register-step {
        flex-direction: column;
        gap: 15px;
        padding: 16px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .step-content h3 {
        font-size: 1.1rem;
    }

    .info-modal-layout {
        grid-template-columns: 1fr;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .info-table thead th,
    .info-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .events-modal-content {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .register-modal-content {
        padding: 24px 14px 16px;
    }
    
    .register-modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }

    .info-modal-content {
        padding: 38px 22px 28px;
    }

    .info-modal-content::before {
        background-size: 152% 114%;
    }

    .info-modal-content .register-modal-close {
        top: 10px;
        right: 10px;
    }
}
