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

body {
    font-family: 'Karla', sans-serif;
    background: #0b0f19;
    min-height: 100vh;
    padding: 1rem;
    color: #e5e7eb;
}

.all {
    width: 100%;
    margin: 0 auto;
    background: rgba(20, 20, 35, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 2rem;
    padding: 1rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.logo {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 600;
    color: #00f2fe;
}
.nickname {
    font-size: clamp(1rem, 3.5vw, 2rem);
    font-weight: 400;
    color: #d500f9;
}

/* Problem section */
.problem {
    background: #161b26;
    border-radius: 1.5rem;
    border: 2px solid #24324d;
    min-height: 25vh;
    overflow: hidden;
}
.problem-header {
    background: #1f293d;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-radius: 1rem 1rem 0 0;
    color: #e5e7eb;
    align-items: center;
    font-size: 1rem;
    border-bottom: 2px solid #24324d;
}
.problem-content {
    line-height: 1.5;
    padding: 1rem 1.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #e5e7eb;
}
.stdout-content {
    line-height: 1.5;
    padding: 1rem 1.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #e5e7eb;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    border-radius: 0 0 1rem 1rem;
}
.answer {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0 1rem;
    padding-bottom: 1rem;
}
#answerField {
    padding: 0.5rem 0.5rem;
    background: #2a2a3c;
    border: 2px solid #24324d;
    color: #e5e7eb;
    font-family: inherit;
    font-size: 0.9rem;
    width: 20rem;
    outline: none;
}
.answer-feedback {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.5rem;
    display: inline-block;
}
.answer-feedback.correct {
    color: #34d399;
}
.answer-feedback.incorrect {
    color: #34d399;
}

/* Separator */
.separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #4a4a6a, transparent);
    margin: 1rem 0;
}

/* Two columns for editors */
.editors {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.panel {
    flex: 1;
    min-width: 280px;
    border-radius: 1.5rem;
    border: 2px solid #24324d;
    overflow: hidden;
}
.panel-header {
    background: #1f293d;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    border-radius: 1rem 1rem 0 0;
    align-items: center;
    font-size: 1rem;
    color: #e5e7eb;
    border-bottom: 2px solid #24324d;
}
.button {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    background: #06b6d420;
    color: #00f2fe;
    border: 2px solid #06b6d4;
    cursor: pointer;
    transition: transform 0.1s;
}
.button:hover {
    transform: scale(1.02);
}
.code-editor {
    width: 100%;
    height: 55vh;
    min-height: 250px;
    background: #161b26;
    border: none;
    border-radius: 0 0 1rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    padding: 1.25rem;
    color: #e2e2e4;
    resize: none;
    line-height: 1.5;
    outline: none;
}
.room-status {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    border: 2px solid transparent;
}
.room-status.connected {
    color: #34d399;
}
.room-status.waiting {
    color: #fbbf24;
}
.room-status.error {
    color: #f87171;
}

/* FONTS */
.font-karla {
    font-family: "Karla", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}
/* end FONTS */


@media (max-width: 800px) {
    body {
        padding: 0.5rem;
    }
    .all {
        width: 100%;
        padding: 1rem;
    }
    .code-editor {
        height: 40vh;
    }
    .problem-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .problem-text {
        padding-right: 0;
    }
    .editors {
        gap: 1rem;
    }
}