/* Map Explorer - Comprehensive Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.7;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 50%, #fff0f0 100%);
    min-height: 100vh;
    color: #2d3436;
}

/* iPad View Styles (Input Form) */
.ipad-view {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    max-width: 720px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background-image: url('images/hope-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.2;
    filter: brightness(0) invert(1);
    z-index: 0;
    pointer-events: none;
}

.container header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.container header h1 {
    font-size: 2.8rem;
    color: #2d3436;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.container header p {
    font-size: 1.1rem;
    color: #636e72;
    font-weight: 300;
    line-height: 1.6;
}

/* Header with Logo Styles */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.home-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.header-text {
    text-align: center;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .header-content {
        gap: 15px;
    }
    
    .home-logo {
        height: 50px;
    }
}

/* Form Styles */
.guest-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group label {
    font-size: 1.2rem;
    font-weight: 400;
    color: #2d3436;
    margin-bottom: 8px;
}

.form-group input[type="text"] {
    padding: 18px 24px;
    font-size: 1.1rem;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.form-group input[type="tel"] {
    padding: 18px 24px;
    font-size: 1.1rem;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-group input[type="tel"].phone-valid {
    border-color: #27ae60;
    background-color: #eafaf1;
}

.form-group input[type="tel"].phone-invalid {
    border-color: #e74c3c;
    background-color: #fdedec;
}

.countries-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

/* Select2 Customization */
.country-select {
    flex: 1;
}

.select2-container {
    flex: 1;
}

.select2-container--default .select2-selection--single {
    height: auto;
    min-height: 56px;
    padding: 0;
    font-size: 1.1rem;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: 1.4;
    padding: 20px;
    padding-top:15px;
    padding-right: 50px;
    display: block;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
    padding: 20px;
    padding-right: 50px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    position: absolute;
    top: 15px!important;
    right: 10px!important;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #888 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0 4px;
    height: 0;
    left: 50%;
    margin-left: -4px;
    margin-top: -2px;
    position: absolute;
    top: 50%;
    width: 0;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #6366f1;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.select2-dropdown {
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    margin-top: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.select2-container--default .select2-results__option {
    padding: 12px 20px;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3498db;
    color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e8f5e8;
    color: #27ae60;
    font-weight: 500;
}

.select2-container--default .select2-results__option--highlighted[aria-selected=true] {
    background-color: #27ae60;
    color: white;
}

/* Mobile responsiveness for Select2 */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        min-height: 50px;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered,
    .select2-container--default .select2-selection--single .select2-selection__placeholder {
        padding: 15px;
        padding-right: 40px;
        font-size: 1rem;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        right: 15px;
    }
    
    .select2-container--default .select2-results__option {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .select2-container--default .select2-search--dropdown .select2-search__field {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

.add-btn {
    padding: 20px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.add-btn:hover {
    background: #2980b9;
}

.selected-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.country-tag {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fef3f2 0%, #fee2e2 100%);
    border: 1px solid #f87171;
    border-radius: 20px;
    padding: 10px 18px;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.15);
    transition: all 0.2s ease;
}

.country-tag span {
    font-size: 1rem;
    color: #dc2626;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.remove-btn:hover {
    background: #c0392b;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.submit-btn {
    padding: 18px 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 240px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    letter-spacing: 0.5px;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Message Styles */
.message {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 999;
    width: 100%;
    box-sizing: border-box;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message.success {
    background: #d5f4e6 !important;
    color: #27ae60 !important;
    border: 2px solid #27ae60 !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.message.error {
    background: #fadbd8 !important;
    color: #e74c3c !important;
    border: 2px solid #e74c3c !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.message.hidden {
    display: none !important;
}

/* Laptop View Styles (Map Display) */
.laptop-view {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.map-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Japanese-style Map Header */
.map-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 255, 0.9) 100%);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(220, 214, 254, 0.3);
    padding: 35px 45px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.02);
    z-index: 1000;
    position: relative;
}

.map-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #f87171 0%, #6366f1 50%, #ec4899 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 40px;
}

.header-main {
    flex: 1;
    min-width: 0;
}

.map-title {
    font-size: 2.4rem;
    font-weight: 300;
    color: #2d3436;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.title-text {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.map-subtitle {
    font-size: 1rem;
    color: #636e72;
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.map-tagline {
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b5cf6;
    margin: 8px 0 0 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.85;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.map-tagline::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    border-radius: 1px;
    opacity: 0.6;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.6);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(100, 116, 139, 0.3), transparent);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
    transform: rotate(180deg);
}

.refresh-text {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.map {
    flex: 1;
    width: 100%;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.05);
}

/* Add subtle overlay for better visual hierarchy */
.map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Sidebar Styles */
.sidebar {
    position: absolute;
    bottom: 20px;
    width: 350px;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes sidebarSlideLeftOut {
    0% { 
        transform: translateX(0);
        opacity: 1;
    }
    4.5% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    50% { 
        transform: translateX(-100%);
        opacity: 0;
    }
    54.5% { 
        transform: translateX(0);
        opacity: 1;
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes sidebarSlideRightOut {
    0% { 
        transform: translateX(0);
        opacity: 1;
    }
    4.5% { 
        transform: translateX(100%);
        opacity: 0;
    }
    50% { 
        transform: translateX(100%);
        opacity: 0;
    }
    54.5% { 
        transform: translateX(0);
        opacity: 1;
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar-left {
    left: 20px;
    animation: sidebarSlideLeftOut 22s ease-in-out infinite;
}

.sidebar-right {
    right: 20px;
    animation: sidebarSlideRightOut 22s ease-in-out infinite;
}

/* Legend Styles */
.legend {
    padding: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.legend h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #2c3e50;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid;
}

.legend-dot.singapore {
    background: #e74c3c;
    border-color: #c0392b;
    width: 20px;
    height: 20px;
}

.legend-dot.guest {
    background: #3498db;
    border-color: #2980b9;
}

.legend-line {
    width: 30px;
    height: 2px;
    background: #e74c3c;
    border-style: dashed;
    border-width: 1px 0;
    border-color: #e74c3c;
}

/* Custom Map Marker Styles */
.singapore-marker, .guest-marker {
    background: transparent;
    border: none;
}

.marker-dot {
    border-radius: 50%;
    border: 3px solid;
    position: relative;
}

.singapore-dot {
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border-color: #c0392b;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
}

.guest-dot {
    width: 16px;
    height: 16px;
    background: #e74c3c;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

/* Countries List Styles */
.countries-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.countries-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.06) 0%, rgba(155, 89, 182, 0.06) 100%);
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.countries-header h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-weight: 700;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin: 0;
    font-style: italic;
}

.countries-table-container {
    flex: 1;
    overflow-y: auto;
    border-radius: 0 0 12px 12px;
}

/* Custom scrollbar for table container */
.countries-table-container::-webkit-scrollbar {
    width: 6px;
}

.countries-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.countries-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 3px;
}

.countries-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #8e44ad);
}

.countries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.countries-table thead {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(155, 89, 182, 0.08) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.countries-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid rgba(52, 152, 219, 0.2);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-col {
    width: 40px;
    text-align: center;
}

.country-col {
    width: auto;
    padding-left: 15px;
}

.guests-col {
    width: 60px;
    text-align: center;
}

.country-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.country-row:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(155, 89, 182, 0.05) 100%);
    transform: translateX(2px);
}

.country-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.01);
}

.country-row:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(155, 89, 182, 0.05) 100%);
}

.countries-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rank-cell {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rank-gold {
    color: #f1c40f;
    text-shadow: 0 1px 2px rgba(241, 196, 15, 0.3);
}

.rank-silver {
    color: #95a5a6;
    text-shadow: 0 1px 2px rgba(149, 165, 166, 0.3);
}

.rank-bronze {
    color: #d68910;
    text-shadow: 0 1px 2px rgba(214, 137, 16, 0.3);
}

.country-cell {
    padding-left: 15px;
}

.country-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.guests-cell {
    text-align: center;
}

.guest-count {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 25px;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.no-data {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ipad-view .container {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .countries-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-btn {
        margin-top: 10px;
    }
    
    .map-header {
        padding: 20px 15px;
    }
    
    .header-content-wrapper {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-main {
        text-align: center;
    }
    
    .map-title {
        font-size: 1.8rem;
        justify-content: center;
    }
    
    .map-subtitle {
        font-size: 0.9rem;
    }
    
    .header-stats {
        padding: 12px 16px;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .refresh-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .sidebar {
        width: auto;
        max-height: 40vh;
    }
    
    .sidebar-left {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .sidebar-right {
        bottom: 45vh;
        left: 10px;
        right: 10px;
    }
    
    .countries-header {
        padding: 15px;
    }
    
    .countries-table th,
    .countries-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .country-cell {
        padding-left: 10px;
    }
}

@media (max-height: 600px) {
    .ipad-view {
        padding: 10px;
        align-items: flex-start;
    }
    
    .container {
        margin-top: 10px;
    }
}

/* Japanese-style Animation Styles */
.rotating, .earth {
    display: inline-block;
    animation: gentleFloat 3s ease-in-out infinite;
    transform-origin: center;
    transition: all 0.4s ease;
}

.rotating:hover, .earth:hover {
    animation: quickFloat 1s ease-in-out infinite;
    transform: scale(1.1);
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    50% {
        transform: translateY(-2px) rotate(0deg);
    }
    75% {
        transform: translateY(-1px) rotate(-1deg);
    }
}

@keyframes quickFloat {
    0%, 100% {
        transform: translateY(0px) scale(1.1);
    }
    50% {
        transform: translateY(-5px) scale(1.15);
    }
}

.country-tag {
    animation: slideIn 0.3s ease-out;
}

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

.message:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

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

/* Japanese-style Data Display Page */
.data-display-view {
    padding: 20px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 50%, #fff0f0 100%);
}

.data-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(220, 214, 254, 0.3);
}

.page-title {
    font-size: 2.5rem;
    color: #2d3436;
    margin-bottom: 12px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #636e72;
    font-weight: 300;
    margin-bottom: 25px;
}

.navigation-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.data-table thead {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 400;
    color: #2d3436;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(220, 214, 254, 0.3);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #2d3436;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 255, 0.5);
}

.data-table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    letter-spacing: 0.2px;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 255, 0.6) 100%);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(220, 214, 254, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-card-number {
    font-size: 2.2rem;
    font-weight: 300;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-card-label {
    font-size: 0.9rem;
    color: #636e72;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state-text {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 300;
}

.empty-state-subtext {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Responsive design for data display */
@media (max-width: 768px) {
    .data-container {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .navigation-bar {
        gap: 12px;
    }
    
    .nav-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .stat-card {
        padding: 18px;
    }
    
    .stat-card-number {
        font-size: 1.8rem;
    }
} 