@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&family=Poppins:wght@700;900&display=swap');

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #1a1a2e;
}

body.xr-active {
    overflow: hidden;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #FFD93D 0%, #FFAA4C 50%, #FF8E53 100%);
    z-index: 1000;
    transition: opacity 0.5s ease;
    overflow-y: auto;
    padding: 2rem 0;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-box {
    background: rgba(255,255,255,0.95);
    border-radius: 30px;
    padding: 3rem;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

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

.logo {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    color: #FF8E53;
    margin-bottom: 1rem;
    font-weight: 900;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.requirements {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.requirements h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trial-info {
    background: linear-gradient(135deg, #FFE66D 0%, #FFD93D 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 217, 61, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.trial-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.trial-info p {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.trial-info strong {
    font-size: 1.2rem;
    color: #FF8E53;
}

.req-list {
    list-style: none;
    color: #555;
}

.req-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.req-list li::before {
    content: "✓";
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2rem;
}

.start-button {
    background: linear-gradient(135deg, #FFD93D 0%, #FFAA4C 100%);
    color: #333;
    border: none;
    padding: 1.3rem 3.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 170, 76, 0.4);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.start-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 170, 76, 0.6);
    background: linear-gradient(135deg, #FFED4E 0%, #FFBC5C 100%);
}

.start-button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.error-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1.5rem;
    display: none;
    animation: shake 0.5s ease;
}

.error-box.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    font-size: 1rem;
    opacity: 0.95;
}

.loading {
    display: none;
    margin-top: 1rem;
    color: #FF8E53;
    font-size: 1.1rem;
}

.loading.show {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 170, 76, 0.3);
    border-top-color: #FFAA4C;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hand-info {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    z-index: 100;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.hand-info.show {
    display: block;
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.controls-panel {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    border-radius: 25px;
    padding: 15px 30px;
    display: none;
    gap: 15px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.controls-panel.show {
    display: flex;
}

.color-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-dot {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.color-dot:hover {
    transform: scale(1.15);
}

.color-dot.active {
    border-color: #333;
    transform: scale(1.2);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.exit-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.exit-button:hover {
    background: #ee5a6f;
    transform: translateY(-2px);
}

/* DOM Overlay Input */
.note-input-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: none;
    z-index: 10000;
    min-width: 300px;
}

.note-input-overlay.show {
    display: block;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-container label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

#noteTextInput {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 2px solid #FFAA4C;
    border-radius: 8px;
    font-family: 'Noto Sans JP', sans-serif;
}

#noteTextInput:focus {
    outline: none;
    border-color: #FF8E53;
}

.input-buttons {
    display: flex;
    gap: 0.5rem;
}

.input-buttons button {
    flex: 1;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Noto Sans JP', sans-serif;
}

.submit-btn {
    background: #4CAF50;
    color: white;
}

.submit-btn:hover {
    background: #45a049;
}

.cancel-btn {
    background: #ddd;
    color: #333;
}

.cancel-btn:hover {
    background: #ccc;
}
