* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    height: 100vh;
    width: 100vw;
    max-width: 1080px;
    max-height: 1920px;
    margin: 0 auto;
    overflow-x: hidden;
    background: rgba(15, 101, 167, 0.05);
}

.header {
    background: #0f65a7;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1080px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#current-time {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.8rem;
    font-weight: 600;
    color: #fff;
}
.app-title {
    font-size: 24px;
    font-weight: bold;
}

.language-selector {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    outline: none;
    right: 30px;
}

.language-selector option {
    background: #0f65a7;
    color: white;
}

main {
    position: relative;
    min-height: 100vh;
    padding: 120px 20px 50px;
    background: linear-gradient(135deg, rgba(15, 101, 167, 0.08) 0%, rgba(220, 12, 22, 0.08) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

#company-logo img {
    width: auto;
    height: 55px;
    display: flex;
    align-items: center;
}

.background-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(15, 101, 167, 0.06);
}

.circle:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -50px;
    background: rgba(15, 101, 167, 0.04);
}

.circle:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 25%;
    right: -30px;
    background: rgba(220, 12, 22, 0.05);
}

.circle:nth-child(3) {
    width: 300px;
    height: 300px;
    top: 40%;
    left: -100px;
    background: rgba(15, 101, 167, 0.03);
}

.circle:nth-child(4) {
    width: 120px;
    height: 120px;
    top: 55%;
    right: -20px;
    background: rgba(220, 12, 22, 0.04);
}

.circle:nth-child(5) {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: -70px;
    background: rgba(15, 101, 167, 0.03);
}

.circle:nth-child(6) {
    width: 180px;
    height: 180px;
    bottom: 10%;
    right: -60px;
    background: rgba(220, 12, 22, 0.04);
}

.circle:nth-child(7) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 50%;
    background: rgba(15, 101, 167, 0.06);
}

.circle:nth-child(8) {
    width: 100px;
    height: 100px;
    bottom: 40%;
    left: 30%;
    background: rgba(220, 12, 22, 0.05);
}

.circle:nth-child(9) {
    width: 60px;
    height: 60px;
    top: 70%;
    right: 25%;
    background: rgba(15, 101, 167, 0.07);
}

.circle:nth-child(10) {
    width: 220px;
    height: 220px;
    top: 5%;
    right: 20%;
    background: rgba(220, 12, 22, 0.02);
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    /* max-width: 950px; */
    margin-top: 45px;
}

.expo-section {
    width: 100%;
    /* max-width: 900px; */
    margin: 0 auto 40px;
}

.expo-video {
    width: 100%;
    text-align: center;
    margin-top: -60px;
    max-height: 85vh;
}

.expo-video video {
    height: auto;
    width: 89%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* .question {
    font-size: 52px;
    font-weight: bold;
    margin-bottom: 65px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
} */

.main-title {
    text-align: center;
    /* padding: 80px 40px; */
    animation: fadeInUp 1.5s ease-out;
    margin-bottom: 70px;
}

.main-title h2 {
    font-size: 58px;
    font-weight: bold;
    color: #0f65a7;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    margin-bottom: 20px;
    /* animation: pulse 2s infinite; */
    /* animation: continuousPulse 3s ease-in-out infinite; */
}

.decorative-line {
    /* width: 200px; */
    height: 5px;
    background: linear-gradient(90deg, #0f65a7, #dc0c16);
    margin: 25px auto;
    border-radius: 2px;
}

/* .server-text-area {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    bottom: 20px; */
/* margin-top: 80px; */
/* max-width: 650px; */
/* width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 120px;
    text-align: left;
} */
/* .server-text-area {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    bottom: 20px;
    left: 50%;
    position: fixed;
    transform: translateX(-50%);
    width: 90%;
    z-index: 1500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 120px;
    text-align: left;
} */

.server-text {
    font-size: 42px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.typing-cursor {
    display: inline-block;
    background-color: #333;
    width: 2px;
    animation: blink 1s infinite;
}
@keyframes continuousPulse {
    0%,
    100% {
        transform: scale(1);
        color: #0f65a7;
    }
    50% {
        transform: scale(1.03);
        color: #1a7bc4;
    }
}
@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

/* コントロールパネル */
.control-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* バツアイコンのスタイル */
.close-button {
    position: absolute;
    top: 25px;
    right: 25px;
    background: transparent;
    border: none;
    font-size: 40px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #000;
}
/* 
.control-panel {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease;
} */
.control-panel {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.control-panel h3 {
    font-size: 46px;
    margin-bottom: 50px;
    color: #333;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-button {
    padding: 30px 30px;
    border: none;
    border-radius: 10px;
    font-size: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #88929c;
    color: white;
    border-left: 30px solid transparent;
}

.control-button.stop {
    border-left-color: #dc3545;
}

.control-button.start {
    border-left-color: #28a745;
}

/* .control-button.media-start {
    border-left-color: #28a745;
}

.control-button.media-stop {
    border-left-color: #dc3545;
}

.control-button.reload {
    border-left-color: #007bff;
}

.control-button.change {
    border-left-color: #fd7e14;
} */

.control-button.homepose {
    border-left-color: #17a2b8;
}

.control-button.initpose {
    border-left-color: #fd7e14;
}
.control-button.close {
    background: #f0f0f0;
    color: #666666;
    border: 1px solid #cccccc;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.control-button:active {
    transform: translateY(0);
}

.control-button .spinner {
    margin-left: 12px;
    display: inline-block;
    font-size: 28px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.control-button:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.app-disabled {
    pointer-events: none;
    opacity: 0.7;
}

.app-disabled .fruit-button {
    opacity: 0.5;
}

@media (max-width: 700px) {
    .question {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .fruit-buttons {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 350px;
    }

    .fruit-button {
        font-size: 28px;
        padding: 20px 30px;
        width: 320px;
        height: 85px;
    }

    .fruit-emoji {
        font-size: 38px;
    }

    /* .server-text-area {
        padding: 20px;
        max-width: 90%;
    } */

    .server-text {
        font-size: 16px;
    }

    .control-panel {
        padding: 30px 20px;
    }
}

@media (max-width: 400px) {
    .fruit-button {
        width: 280px;
        font-size: 24px;
    }
}

.startup-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.startup-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.startup-content h2 {
    font-size: 46px;
    margin-bottom: 50px;
    color: #333;
}

.startup-button {
    background: #0f65a7;
    color: white;
    border: none;
    padding: 30px 30px;
    font-weight: 600;
    font-size: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 300px;
    margin: 20px;
}
.startup-button-ATM {
    background: #0f65a7;
    color: white;
    border: none;
    padding: 30px 30px;
    font-weight: 600;
    font-size: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 300px;
    margin: 20px;
}

.startup-button:hover {
    background: #0d5591;
}
/* A の場合：右側に吹き出し */
.server-text-area.a {
    margin-right: 20px;
    /* position: relative; */
    bottom: 20px;
}
.server-text-area.a::after {
    content: "";
    position: absolute;
    /* top: 20px; */
    right: -15px; /* 三角を右側に */
    border-width: 10px 0 10px 15px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}

/* B の場合：左側に吹き出し */
.server-text-area.b {
    margin-right: auto;
    margin-left: 20px;
    /* position: relative; */
    bottom: 20px;
}
.server-text-area.b::after {
    content: "";
    position: absolute;
    /* top: 20px; */
    left: -15px; /* 三角を左側に */
    border-width: 10px 15px 10px 0;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.9) transparent transparent;
}

/* N の場合（ナレーション）：変更なし、吹き出しも無し */
.server-text-area.n {
    margin: 20px auto;
    bottom: 20px;
}
.server-text-area.n::after {
    display: none;
}

.server-text-area {
    display: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    bottom: 20px;
    left: 50%;
    position: fixed;
    transform: translateX(-50%);
    width: 90%;
    z-index: 1500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-height: 120px;
    text-align: left;
}

.hidden {
    display: none;
}

.video-image {
    width: 85%;
    margin-top: 25px;
}

/* @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap"); */

/* .login-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
} */

h1 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 500;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 30px;
    color: #666;
}

input {
    width: 500px;
    height: 80px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 28px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 20px;
    background: white;
    transition: border-color 0.3s;
}
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.login-btn {
    background: #0f65a7;
    color: white;
    border: none;
    height: 70px;
    font-weight: 600;
    font-size: 32px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 300px;
    margin: 20px;
}

.login-btn:hover {
    background: #5a67d8;
}

#loginmessage {
    margin-top: 50px;
    font-size: 30px;
    color: #e53e3e;
}
#message {
    margin-top: 50px;
    font-size: 30px;
    color: #e53e3e;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 60px; /* アイコン分の余白 */
}

.toggle-password {
    position: absolute;
    right: 20px;
    cursor: pointer;
    font-size: 28px;
    color: #666;
    user-select: none;
}

.toggle-password:hover {
    color: #0f65a7;
}

.login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.login-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-content h2 {
    font-size: 46px;
    margin-bottom: 50px;
    color: #333;
}

.robot-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.robot-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.robot-content h2 {
    font-size: 46px;
    margin-bottom: 50px;
    color: #333;
}

.selectrobot-btn {
    background: #0f65a7;
    color: white;
    border: none;
    height: 70px;
    font-weight: 600;
    font-size: 32px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 300px;
    margin: 20px;
}

.selectrobot-btn:hover {
    background: #5a67d8;
}
