/* NSN Game Hub - Lobby Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 0;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

main {
    min-height: 400px;
    position: relative;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error Display */
.error {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}

.error p {
    color: #e74c3c;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.footer-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.admin-btn {
    background: #333;
    color: #888;
    border: 1px solid #555;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn:hover {
    background: #444;
    color: #fff;
}

.admin-btn.danger {
    border-color: #d32f2f;
    color: #ff6b6b;
}

.admin-btn.danger:hover {
    background: #d32f2f;
    color: white;
}

.error button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.error button:hover {
    background: #764ba2;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.game-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* 표준 로비 시스템 적용 표시 */
.standard-lobby-bar {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.game-icon {
    font-size: 4em;
    margin-bottom: 15px;
    display: block;
}

.game-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.game-description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.game-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 15px;
}

.game-status.online {
    background: #2ecc71;
    color: white;
}

.game-status.offline {
    background: #e74c3c;
    color: white;
}

.play-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}

.play-button:hover {
    background: #764ba2;
    transform: scale(1.05);
}

.play-button:active {
    transform: scale(0.95);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    opacity: 0.9;
}

footer p {
    margin: 5px 0;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-card {
        padding: 25px;
    }
}

/* ================= Admin Panel Styles ================= */

/* 헤더 아이콘 버튼 공통 스타일 */
.header-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2em;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.header-icon-btn.copied {
    background: rgba(46, 204, 113, 0.3);
    border-color: rgba(46, 204, 113, 0.5);
}

/* 관리자 버튼 회전 효과 */
#admin-panel-btn:hover {
    transform: rotate(90deg);
}

/* Modal base styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-modal-content {
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

/* Admin sections */
.admin-section {
    text-align: center;
}

.admin-section p {
    color: #666;
    margin-bottom: 15px;
}

.admin-section input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.admin-section input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.admin-hint {
    font-size: 0.9em;
    color: #888 !important;
    margin-bottom: 20px !important;
}

/* Admin buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Admin games list */
.admin-games-list {
    margin: 20px 0;
}

.admin-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.3s;
    gap: 10px;
}

.admin-game-item:hover {
    background: #f8f9fa;
}

.admin-game-item.hidden-game {
    background: #fff3cd;
    border-color: #ffc107;
}

/* 드래그 핸들 */
.drag-handle {
    cursor: grab;
    font-size: 1.2em;
    color: #adb5bd;
    padding: 5px 10px;
    user-select: none;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: #667eea;
}

.drag-handle:active {
    cursor: grabbing;
}

.order-number {
    font-size: 0.85em;
    font-weight: bold;
    color: #6c757d;
    min-width: 25px;
    text-align: center;
}

/* 드래그 상태 스타일 */
.admin-game-item.dragging {
    opacity: 0.5;
    background: #e3e8ff;
    border: 2px dashed #667eea;
}

.admin-game-item.drag-over {
    border: 2px solid #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.admin-game-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.admin-game-icon {
    font-size: 1.5em;
}

.admin-game-name {
    font-weight: 500;
    color: #333;
}

.admin-game-status {
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 12px;
}

.admin-game-status.status-visible {
    background: #d4edda;
    color: #155724;
}

.admin-game-status.status-hidden {
    background: #f8d7da;
    color: #721c24;
}

/* Game actions container */
.admin-game-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Play button */
.admin-play-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    background: #667eea;
    color: white;
}

.admin-play-btn:hover {
    background: #764ba2;
    transform: scale(1.1);
}

/* Toggle buttons */
.admin-toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-toggle-btn.btn-hide {
    background: #ffc107;
    color: #333;
}

.admin-toggle-btn.btn-hide:hover {
    background: #e0a800;
}

.admin-toggle-btn.btn-show {
    background: #28a745;
    color: white;
}

.admin-toggle-btn.btn-show:hover {
    background: #218838;
}

/* Admin actions */
.admin-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.admin-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.admin-tab:hover {
    color: #667eea;
    background: #f8f9fa;
}

.admin-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.admin-tab-content {
    min-height: 200px;
}

.admin-tab-content.hidden {
    display: none;
}

/* Server Action Cards */
.server-action-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.server-action-card:hover {
    border-color: #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.action-icon {
    font-size: 2.5em;
}

.action-info {
    flex: 1;
}

.action-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.action-info p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Admin Footer */
.admin-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* ================= User Area Styles ================= */
.user-area {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-nickname {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95em;
}

.user-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 150px;
    z-index: 100;
}

.user-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #333;
    font-size: 0.95em;
    transition: background 0.3s;
}

.user-dropdown button:hover {
    background: #f0f0f0;
}

.user-dropdown button:last-child {
    border-top: 1px solid #eee;
    color: #dc3545;
}

/* ================= Auth Modal Styles ================= */
.auth-modal-content {
    max-width: 400px;
    padding: 0;
}

.auth-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.auth-tab:hover {
    color: #667eea;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form {
    padding: 25px;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.auth-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Nickname Modal */
.nickname-modal-content {
    max-width: 400px;
    padding: 0;
}

.nickname-modal-content .modal-header {
    padding: 20px;
}

.nickname-modal-content .form-group {
    padding: 0 25px;
    margin-top: 20px;
}

.nickname-modal-content .auth-error {
    margin: 0 25px 15px;
}

.nickname-modal-content .auth-submit-btn {
    margin: 20px 25px 25px;
    width: calc(100% - 50px);
}

/* Responsive user area */
@media (max-width: 768px) {
    .user-area {
        position: static;
        justify-content: center;
        margin-bottom: 10px;
    }

    .user-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* Responsive admin panel */
@media (max-width: 480px) {
    .header-actions {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .header-icon-btn {
        font-size: 1em;
        padding: 6px 8px;
    }

    .header-coin-area {
        display: none; /* 모바일에서 헤더 코인 숨김 */
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.2em;
    }

    .admin-game-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .admin-game-info {
        flex-direction: column;
    }

    .admin-game-order {
        flex-direction: row;
    }

    .admin-actions {
        flex-direction: column;
    }

    .admin-actions button {
        width: 100%;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .admin-tab.active {
        border-bottom: none;
        border-left-color: #667eea;
    }

    .server-action-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ================= Bug Report Styles ================= */

/* Footer Bug Report Button */
.bug-report-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.bug-report-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Bug Modal */
.bug-modal-content {
    max-width: 500px;
    padding: 0;
}

.bug-modal-content .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
}

.bug-modal-content .modal-header h2 {
    margin: 0;
}

.bug-modal-content .modal-close {
    color: white;
}

/* Bug Tabs */
.bug-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.bug-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    color: #999;
    transition: all 0.3s;
}

.bug-tab:hover {
    color: #667eea;
}

.bug-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Bug Form */
.bug-form {
    padding: 25px;
}

.bug-form.hidden {
    display: none;
}

.bug-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

.bug-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Bug List Container */
.bugs-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Bug Item */
.bug-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.bug-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bug-item-title {
    font-weight: 600;
    color: #333;
}

.bug-item-date {
    font-size: 0.85em;
    color: #888;
}

/* Bug Status Badges */
.bug-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-pending {
    background: #ffc107;
    color: #333;
}

.status-progress {
    background: #17a2b8;
    color: white;
}

.status-resolved {
    background: #28a745;
    color: white;
}

.status-closed {
    background: #6c757d;
    color: white;
}

/* Admin Bug List - Table Style */
.admin-bugs-list {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
}

.admin-bugs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.admin-bugs-table thead {
    background: #667eea;
    color: white;
    position: sticky;
    top: 0;
}

.admin-bugs-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.admin-bugs-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.admin-bugs-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-bugs-table .bug-date {
    white-space: nowrap;
    color: #888;
    font-size: 0.85em;
}

.admin-bugs-table .bug-title-cell {
    max-width: 250px;
}

.admin-bugs-table .bug-title-text {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.admin-bugs-table .bug-title-text:hover {
    color: #667eea;
    text-decoration: underline;
}

.admin-bugs-table .bug-content-expandable {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-bugs-table .bug-reporter {
    color: #666;
    font-size: 0.9em;
}

.admin-bug-status-select {
    padding: 5px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: border-color 0.3s;
}

.admin-bug-status-select:focus {
    outline: none;
    border-color: #667eea;
}

.bug-delete-btn {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
}

.bug-delete-btn:hover {
    background: #c82333;
}

/* Responsive Bug Styles */
@media (max-width: 480px) {
    .bug-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .bug-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-bugs-table {
        font-size: 0.8em;
    }

    .admin-bugs-table th,
    .admin-bugs-table td {
        padding: 8px 5px;
    }

    .admin-bugs-table .bug-title-cell {
        max-width: 120px;
    }

    .admin-bug-status-select {
        padding: 4px 6px;
        font-size: 0.8em;
    }

    .bug-delete-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }
}

/* ================= Admin Hall of Fame Settings ================= */

.admin-hof-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.admin-hof-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.admin-hof-table thead {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #333;
    position: sticky;
    top: 0;
}

.admin-hof-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.admin-hof-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.admin-hof-table tbody tr:hover {
    background: #fffbf0;
}

.hof-game-icon {
    font-size: 1.3em;
    margin-right: 10px;
}

.hof-game-name {
    font-weight: 500;
    color: #333;
}

.hof-sort-select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    min-width: 120px;
}

.hof-sort-select:focus {
    outline: none;
    border-color: #fda085;
    box-shadow: 0 0 0 3px rgba(253, 160, 133, 0.2);
}

.hof-sort-select:hover {
    border-color: #f6d365;
}

/* Responsive Hall of Fame Settings */
@media (max-width: 480px) {
    .admin-hof-table {
        font-size: 0.85em;
    }

    .admin-hof-table th,
    .admin-hof-table td {
        padding: 10px 8px;
    }

    .hof-game-icon {
        font-size: 1.1em;
        margin-right: 6px;
    }

    .hof-sort-select {
        padding: 6px 8px;
        font-size: 0.85em;
        min-width: 100px;
    }
}

/* ================= Admin Coin Settings ================= */

.admin-coin-list {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.coin-setting-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    flex-shrink: 0;
}

.coin-setting-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.coin-setting-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 48px;
}

.coin-setting-header span {
    color: white;
}

.coin-game-name {
    font-weight: 600;
    font-size: 1.05em;
}

.coin-game-id {
    font-size: 0.85em;
    opacity: 0.8;
}

.coin-enabled-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85em;
    color: white;
}

.coin-enabled-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.coin-setting-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
}

.coin-setting-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-setting-row label {
    min-width: 120px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95em;
}

.coin-input {
    width: 80px;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: right;
    transition: all 0.3s;
}

.coin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.coin-unit {
    font-weight: 600;
    color: #f39c12;
    font-size: 0.9em;
}

.coin-single-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    cursor: pointer;
    font-size: 0.85em;
    color: #6c757d;
}

.coin-single-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.coin-setting-footer {
    padding: 12px 15px;
    background: #f1f3f5;
    text-align: right;
    border-top: 1px solid #e9ecef;
}

.btn-save-coin {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save-coin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.btn-save-coin:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Coin Settings */
@media (max-width: 480px) {
    .coin-setting-row {
        flex-wrap: wrap;
    }

    .coin-setting-row label {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .coin-input {
        width: 70px;
    }

    .coin-single-toggle {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ========== 환영 모달 (Welcome Modal) ========== */

.welcome-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: white;
}

.welcome-header {
    text-align: center;
    padding: 30px 20px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.welcome-header h2 {
    font-size: 2em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-section {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid rgba(255, 255, 255, 0.5);
}

/* 환영 모달 내 coin-section 스타일 오버라이드 (관리자 패널 스타일 충돌 방지) */
.welcome-section.coin-section {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.section-icon {
    font-size: 2.5em;
    min-width: 60px;
    text-align: center;
}

.section-info {
    flex: 1;
}

.section-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.coin-stats,
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95em;
}

.stat-label {
    opacity: 0.9;
}

.stat-value {
    font-weight: bold;
    color: #ffd700;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
}

.stat-item:last-child {
    border-bottom: none;
}

.game-name {
    flex: 1;
    font-weight: 500;
}

.game-stats {
    opacity: 0.9;
    min-width: 100px;
    text-align: right;
}

.no-stats {
    opacity: 0.8;
    font-style: italic;
    margin: 0;
}

.bonus-message {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    opacity: 0.95;
}

/* 명예의 전당 섹션 */
.hall-of-fame-section {
    border-left-color: rgba(255, 215, 0, 0.6) !important;
}

.hof-message {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    opacity: 0.95;
}

.hof-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.hof-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
    background: linear-gradient(135deg, #a66bbe, #9b59b6);
}

.bonus-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.bonus-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.bonus-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.welcome-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.welcome-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .welcome-modal-content {
        max-width: 90%;
    }

    .welcome-header h2 {
        font-size: 1.6em;
    }

    .section-icon {
        font-size: 2em;
    }

    .welcome-content {
        padding: 20px;
        gap: 15px;
    }
}

/* ========== 헤더 액션 영역 (우측 버튼들) ========== */

.header-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 50;
}

/* 코인 영역 */
.header-coin-area {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px;
}

/* 코인 뱃지 */
.coin-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.coin-badge .coin-icon {
    font-size: 1em;
}

.coin-badge .coin-unit {
    opacity: 0.8;
    font-size: 0.85em;
}

/* 미니 출석체크 버튼 */
.btn-attendance-mini {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #7bed7b;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-attendance-mini:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.4);
    border-color: rgba(76, 175, 80, 0.6);
}

.btn-attendance-mini:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 출석체크 버튼 (환영 모달용) */
.btn-attendance {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-attendance:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #5CBD61, #52b659);
}

.btn-attendance:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 코인 알림 */
.coin-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 220px;
    font-weight: bold;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 획득한 코인 */
.coin-notification.earned {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.coin-notification.earned::before {
    content: '✨ ';
}

/* 차감된 코인 */
.coin-notification.deducted {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

.coin-notification.deducted::before {
    content: '⚠️ ';
}

/* 알림 컨텐츠 구조 */
.coin-notification-amount {
    font-size: 1.3em;
    margin-bottom: 5px;
}

.coin-notification-reason {
    font-size: 0.9em;
    opacity: 0.95;
    margin-bottom: 3px;
}

.coin-notification-balance {
    font-size: 0.85em;
    opacity: 0.85;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 5px;
    margin-top: 5px;
}

/* 알림 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* 반응형 조정 */
@media (max-width: 768px) {
    .header-actions {
        gap: 6px;
    }

    .coin-badge {
        padding: 5px 10px;
        font-size: 0.85em;
    }

    .btn-attendance-mini {
        padding: 5px 10px;
        font-size: 0.8em;
    }

    .coin-notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ================= 코인 설정 관리자 UI 개선 ================= */

/* 확장된 관리자 모달 (코인 설정 탭용) */
.admin-modal-content.expanded {
    width: 80vw;
    max-width: 1400px;
    max-height: 85vh;
}

.admin-modal-content.expanded .modal-body {
    max-height: calc(85vh - 80px);
}

/* 코인 설정 2-Column 레이아웃 */
.coin-settings-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    height: calc(80vh - 200px);
    min-height: 400px;
}

/* 좌측 게임 테이블 */
.coin-settings-table-container {
    background: #f8f9fa;
    border-radius: 10px;
    overflow-y: auto;
    max-height: calc(80vh - 200px);
}

.coin-settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    table-layout: fixed;
}

.coin-settings-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.coin-settings-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.85em;
}

.coin-settings-table th:first-child {
    text-align: left;
    padding-left: 15px;
}

.coin-settings-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: center;
    font-size: 0.9em;
}

.coin-settings-table td:first-child {
    text-align: left;
    padding-left: 15px;
}

.coin-settings-table tbody tr {
    cursor: pointer;
    transition: all 0.2s;
}

.coin-settings-table tbody tr:hover {
    background: #e8e8ff;
}

.coin-settings-table tbody tr.selected {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-left: 4px solid #667eea;
}

.coin-settings-table tbody tr.selected td:first-child {
    padding-left: 11px;
}

/* 테이블 게임명 셀 */
.coin-table-game-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-table-game-name .game-icon {
    font-size: 1.2em;
}

.coin-table-game-name .game-name {
    font-weight: 500;
    color: #333;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
}

/* 테이블 상태 배지 */
.coin-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.coin-status-badge.on {
    background: #d4edda;
    color: #155724;
}

.coin-status-badge.off {
    background: #f8d7da;
    color: #721c24;
}

/* 테이블 보상 셀 */
.coin-table-reward {
    font-weight: 500;
    color: #495057;
}

.coin-table-reward.empty {
    color: #adb5bd;
}

/* 우측 상세 패널 */
.coin-detail-panel {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.coin-detail-panel.empty {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
}

.coin-detail-empty {
    text-align: center;
    color: #6c757d;
}

.coin-detail-empty .empty-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.coin-detail-empty p {
    font-size: 1.1em;
    margin: 0;
}

/* 상세 패널 헤더 */
.coin-detail-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-detail-header .game-icon {
    font-size: 1.8em;
}

.coin-detail-header .game-info h3 {
    margin: 0;
    font-size: 1.3em;
}

.coin-detail-header .game-info .game-id {
    font-size: 0.85em;
    opacity: 0.85;
}

.coin-detail-header .enabled-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.coin-detail-header .enabled-toggle input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 상세 패널 바디 */
.coin-detail-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 코인 설정 섹션 */
.coin-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #6c757d;
}

.coin-section h4 {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-section.basic {
    border-left-color: #667eea;
}

.coin-section.single-player {
    border-left-color: #28a745;
}

.coin-section.two-player {
    border-left-color: #007bff;
}

.coin-section.multi-player {
    border-left-color: #fd7e14;
}

/* 설정 행 */
.coin-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.coin-detail-row:last-child {
    margin-bottom: 0;
}

.coin-detail-row label {
    min-width: 100px;
    font-weight: 500;
    color: #495057;
    font-size: 0.95em;
}

.coin-detail-row .coin-input {
    width: 80px;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: right;
    transition: all 0.3s;
}

.coin-detail-row .coin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.coin-detail-row .coin-unit {
    font-weight: 600;
    color: #f39c12;
    font-size: 0.9em;
}

/* 섹션 활성화 토글 */
.section-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.85em;
    color: #6c757d;
}

.section-toggle input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* N인용 순위 보상 그리드 */
.multi-player-rewards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.reward-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.reward-rank-row .rank-label {
    min-width: 50px;
    font-weight: 600;
    color: #495057;
}

.reward-rank-row .rank-label.gold { color: #f39c12; }
.reward-rank-row .rank-label.silver { color: #95a5a6; }
.reward-rank-row .rank-label.bronze { color: #cd6133; }

.reward-rank-row .coin-input {
    width: 70px;
    padding: 6px 8px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    text-align: right;
}

.reward-rank-row .remove-rank-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: auto;
    transition: background 0.2s;
}

.reward-rank-row .remove-rank-btn:hover {
    background: #c82333;
}

/* 순위 추가/제거 버튼 */
.reward-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.reward-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-rank {
    background: #28a745;
    color: white;
    border: none;
}

.btn-add-rank:hover {
    background: #218838;
}

/* 상세 패널 푸터 */
.coin-detail-footer {
    padding: 15px 20px;
    background: #f1f3f5;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.coin-detail-footer .btn-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.coin-detail-footer .btn-reset:hover {
    background: #5a6268;
}

.coin-detail-footer .btn-save {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.coin-detail-footer .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.coin-detail-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 코인 설정 반응형 - 태블릿 */
@media (max-width: 1024px) {
    .admin-modal-content.expanded {
        width: 95vw;
        max-width: none;
    }

    .coin-settings-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .coin-settings-table-container {
        max-height: 300px;
    }

    .coin-settings-table tbody {
        max-height: 220px;
    }

    .coin-detail-panel {
        min-height: 400px;
    }
}

/* 코인 설정 반응형 - 모바일 */
@media (max-width: 600px) {
    .coin-settings-table th,
    .coin-settings-table td {
        padding: 8px 4px;
        font-size: 0.8em;
    }

    .coin-detail-row {
        flex-wrap: wrap;
    }

    .coin-detail-row label {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .reward-rank-row {
        flex-wrap: wrap;
    }
}

/* ========== 첫 출석자 축하 모달 ========== */
.first-attendance-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.first-attendance-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(255, 215, 0, 0.3);
    max-width: 450px;
    animation: bounceIn 0.5s ease;
    position: relative;
    border: 3px solid rgba(255, 215, 0, 0.5);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.celebration-confetti {
    font-size: 4em;
    animation: confettiPop 0.6s ease infinite alternate;
    margin-bottom: 10px;
}

@keyframes confettiPop {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.1) rotate(5deg); }
}

.first-attendance-content h2 {
    font-size: 2em;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffd700;
}

.first-nickname {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 215, 0, 0.5); }
    to { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 1); }
}

.first-message {
    font-size: 1.1em;
    opacity: 0.95;
    margin: 15px 0;
}

.first-bonus-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.first-bonus-info p {
    margin: 8px 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}

.first-bonus-info span {
    font-weight: bold;
    color: #7bed7b;
}

.first-bonus-info hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 12px 0;
}

.first-bonus-info .total-bonus span {
    font-size: 1.3em;
    color: #ffd700;
}

.new-balance {
    font-size: 1em;
    opacity: 0.9;
    margin: 15px 0;
}

.first-attendance-content button {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.first-attendance-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

@media (max-width: 500px) {
    .first-attendance-content {
        max-width: 90%;
        padding: 30px 25px;
    }

    .first-attendance-content h2 {
        font-size: 1.5em;
    }

    .first-nickname {
        font-size: 2em;
    }

    .celebration-confetti {
        font-size: 3em;
    }
}