/* 
Kizuna Alert - Enhanced Wabi-Sabi Inspired Design
Minimalist, clean, and focused on function and clarity
Wabi-sabi color palette: Navy blue (#1a2332), off-white (#f8f9fa), soft gray (#94a3b8)
Emphasizes natural imperfection, simplicity, and subtle beauty
*/

:root {
    --navy-blue: #1a2332;
    --navy-blue-light: #2d3e50;
    --navy-blue-dark: #0f1419;
    --off-white: #f8f9fa;
    --soft-gray: #94a3b8;
    --soft-gray-light: #cbd5e1;
    --soft-gray-dark: #64748b;
    --accent-red: #dc2626;
    --accent-green: #16a34a;
    --accent-blue: #2563eb;
    --warm-beige: #e7e5e4;
}

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

body {
    font-family: 'Roboto', 'Noto Sans JP', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--warm-beige) 100%);
    color: var(--navy-blue);
    line-height: 1.7;
    min-height: 100vh;
    font-weight: 300;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.6s ease-in;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-light) 100%);
    color: var(--off-white);
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(26, 35, 50, 0.15);
    margin-bottom: 35px;
    border-bottom: 2px solid var(--soft-gray-light);
}

header h1 {
    font-size: 2.8em;
    font-weight: 200;
    letter-spacing: 3px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header .tagline {
    font-size: 1.05em;
    opacity: 0.92;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Alert Section */
.alert-section {
    background: var(--off-white);
    border-left: 5px solid var(--accent-red);
    padding: 28px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    transition: box-shadow 0.3s ease;
}

.alert-section:hover {
    box-shadow: 0 5px 25px rgba(26, 35, 50, 0.12);
}

.alert-section h2 {
    color: var(--accent-red);
    font-size: 1.6em;
    margin-bottom: 18px;
    font-weight: 400;
}

.alert-item {
    background: #fef2f2;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #fecaca;
}

.alert-item strong {
    color: var(--accent-red);
    font-weight: 500;
}

.alert-badge {
    display: inline-block;
    background: var(--accent-red);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    margin-left: 10px;
    font-weight: 400;
}

/* Form Section */
.form-section {
    background: var(--off-white);
    padding: 35px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    border: 1px solid var(--soft-gray-light);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 5px 25px rgba(26, 35, 50, 0.12);
}

.form-section h2 {
    color: var(--navy-blue);
    font-size: 1.6em;
    margin-bottom: 22px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--navy-blue-light);
    font-weight: 400;
    font-size: 1.05em;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--soft-gray-light);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    color: var(--navy-blue);
}

.form-group input:focus {
    outline: none;
    border-color: var(--navy-blue-light);
    box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.1);
    transform: translateY(-1px);
}

.form-group .hint {
    font-size: 0.9em;
    color: var(--soft-gray-dark);
    margin-top: 6px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-blue-light) 100%);
    color: var(--off-white);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 35, 50, 0.3);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(26, 35, 50, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--soft-gray) 0%, var(--soft-gray-dark) 100%);
}

.btn-checkin {
    background: linear-gradient(135deg, var(--accent-green) 0%, #15803d 100%);
    margin-right: 10px;
}

.btn-checkin:hover {
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}

.btn-leave {
    background: linear-gradient(135deg, var(--soft-gray) 0%, var(--soft-gray-dark) 100%);
}

.btn-evacuation {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
}

.btn-evacuation:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Chat Section */
.chat-header {
    background: var(--off-white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    border: 1px solid var(--soft-gray-light);
}

.chat-header h2 {
    color: var(--navy-blue);
    font-size: 1.9em;
    margin-bottom: 8px;
    font-weight: 400;
}

.chat-header .postal-code {
    color: var(--soft-gray-dark);
    font-size: 1em;
    font-weight: 300;
}

.chat-messages {
    background: var(--off-white);
    padding: 28px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    max-height: 550px;
    overflow-y: auto;
    border: 1px solid var(--soft-gray-light);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--soft-gray-light);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--soft-gray);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--soft-gray-dark);
}

.message {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
    background: white;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease;
}

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

.message:hover {
    box-shadow: 0 2px 10px rgba(26, 35, 50, 0.1);
    transform: translateX(2px);
}

.message.resource {
    background: #f0fdf4;
    border-left-color: var(--accent-green);
}

.message.help {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.message.checkin {
    background: #ecfdf5;
    border-left-color: var(--accent-green);
}

.message.info {
    background: #eff6ff;
    border-left-color: var(--accent-blue);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.message-user {
    font-weight: 500;
    color: var(--navy-blue);
}

.message-time {
    color: var(--soft-gray);
    font-size: 0.9em;
    font-weight: 300;
}

.message-content {
    color: var(--navy-blue-light);
    line-height: 1.6;
}

/* Chat Actions */
.chat-actions {
    background: var(--off-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    text-align: center;
    border: 1px solid var(--soft-gray-light);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--accent-blue);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.info-box h3 {
    color: var(--accent-blue);
    margin-bottom: 12px;
    font-weight: 400;
}

.info-box ul {
    list-style-position: inside;
    color: var(--navy-blue-light);
}

.info-box li {
    margin-bottom: 8px;
}

/* Evacuation Map */
.evacuation-map {
    background: var(--off-white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(26, 35, 50, 0.08);
    border: 1px solid var(--soft-gray-light);
}

.evacuation-map img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(26, 35, 50, 0.1);
    border: 2px solid var(--soft-gray-light);
}

.evacuation-info {
    background: #f0fdf4;
    border-left: 4px solid var(--accent-green);
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
}

.evacuation-info h3 {
    color: var(--accent-green);
    margin-bottom: 12px;
    font-weight: 400;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    color: var(--soft-gray-dark);
    font-size: 0.9em;
    font-weight: 300;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2em;
    }
    
    .container {
        padding: 15px;
    }
    
    .form-section, .alert-section, .chat-messages, .evacuation-map {
        padding: 20px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95em;
    }
}

/* Accessibility improvements */
a:focus, button:focus, input:focus {
    outline: 3px solid var(--navy-blue);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid var(--navy-blue-dark);
    }
    
    .message {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
