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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'ss01', 'cv01';
    background: #c9c9c9;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#app {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Start Screen */
#start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 30px;
    text-align: center;
    color: rgba(0, 0, 0, 0.75);
    position: relative;
    z-index: 1;
}

#start-screen .emoji {
    font-size: 120px;
    margin-bottom: 40px;
    display: block;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

#start-btn {
    padding: 50px 90px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 72px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 8px;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        3px 3px 0px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards, pulse 2s ease-in-out infinite;
    animation-delay: 0.2s, 0.8s;
}

#start-btn:hover {
    transform: scale(1.1);
    text-shadow:
        0 0 15px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 45px rgba(255, 255, 255, 0.6),
        4px 4px 0px rgba(0, 0, 0, 0.4);
}

#start-btn:active {
    transform: scale(1.05);
}

/* Main View */
#main-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Chat Container */
.chat-container {
    width: 100%;
    max-width: 700px;
    height: calc(100vh - 160px);
    max-height: 700px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border-radius: 1.2rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Message Styles */
.message {
    display: flex;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message.system {
    justify-content: center;
}

.message-content {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 1.2rem;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    color: rgba(0, 0, 0, 0.85);
    border-bottom-left-radius: 0.3rem;
}

.message.user .message-content {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    color: #fff;
    border-bottom-right-radius: 0.3rem;
}

.message.system .message-content {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    color: rgba(0, 0, 0, 0.7);
    max-width: 85%;
    font-size: 13px;
    padding: 10px 16px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    border-radius: 1.2rem;
    border-bottom-left-radius: 0.3rem;
    width: fit-content;
    gap: 4px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Chat Input Container */
.chat-input-container {
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 1.2rem;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.chat-input:focus {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.6);
}

.send-button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.send-button:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
}

.send-button:active {
    transform: translateY(-2px) scale(0.95);
}

.send-button svg {
    width: 20px;
    height: 20px;
    stroke: rgba(0, 0, 0, 0.75);
    stroke-width: 2;
    fill: none;
}

/* Info Panel */
#info-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - 40px);
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border-radius: 1.2rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1));
    text-align: center;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.info-text {
    color: rgba(0, 0, 0, 0.75);
    font-weight: 600;
    font-size: 14px;
}

/* Settings removed - now managed via admin panel */

/* Hidden State */
.hidden {
    display: none !important;
}

/* Particles Animation */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float linear forwards;
    animation-duration: 1.5s;
    z-index: 0;
}

.particle.slow {
    animation-duration: 4s;
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--drift));
        opacity: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #start-btn {
        font-size: 48px;
        padding: 30px 50px;
    }

    #start-screen .emoji {
        font-size: 80px;
    }

    #main-view {
        padding: 15px;
    }

    .chat-container {
        height: calc(100vh - 140px);
        max-height: none;
    }

    .chat-messages {
        padding: 20px;
        gap: 12px;
    }

    .message-content {
        max-width: 80%;
        font-size: 14px;
    }

    .chat-input-container {
        padding: 15px 20px;
    }

    .chat-input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .send-button {
        width: 45px;
        height: 45px;
    }

    .send-button svg {
        width: 18px;
        height: 18px;
    }

    #info-panel {
        padding: 10px 16px;
        bottom: 15px;
        width: calc(100% - 30px);
    }

    .info-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #start-btn {
        font-size: 36px;
        padding: 20px 40px;
        letter-spacing: 4px;
    }

    #main-view {
        padding: 12px;
    }

    .chat-container {
        height: calc(100vh - 120px);
    }

    .chat-messages {
        padding: 15px;
        gap: 10px;
    }

    .message-content {
        max-width: 85%;
        font-size: 13px;
        padding: 10px 14px;
    }

    .message.system .message-content {
        font-size: 12px;
        padding: 8px 12px;
    }

    .chat-input-container {
        padding: 12px 15px;
    }

    .chat-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .send-button {
        width: 42px;
        height: 42px;
    }

    .send-button svg {
        width: 16px;
        height: 16px;
    }

    #info-panel {
        padding: 8px 12px;
        bottom: 12px;
        width: calc(100% - 24px);
    }

    .info-text {
        font-size: 12px;
    }
}

/* Prevent zoom on iOS */
@media screen and (max-width: 768px) {
    input {
        font-size: 16px;
    }
}
