/* Base styles */
html, body {
margin: 0;
padding: 0;
}

body {
font-family: Arial, sans-serif;
background-color: #21242b;
margin: 0;
padding-top: 40px;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
overflow-y: auto;
}

#editor-container {
width: 100%;
height: calc(100vh - 140px);
display: flex;
flex-direction: column;
max-width: 950px;
overflow: hidden;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
margin-top: 45px;
margin-bottom: 20px;
}

#top-bar {
height: 50px;
background-color: #4b5363;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
flex-shrink: 0;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}

.view-toggle {
display: flex;
background-color: #21252b;
border-radius: 5px;
padding: 2px;
}

.view-toggle button {
padding: 6px 12px;
background: none;
border: none;
color: #9da5b4;
cursor: pointer;
border-radius: 4px;
font-size: 13px;
transition: all 0.2s ease;
}

.view-toggle button.active {
background-color: #2c313a;
color: #ffffff;
}

/* Theme toggle button */
.theme-toggle {
background: none;
border: none;
color: #9da5b4;
cursor: pointer;
padding: 8px;
border-radius: 4px;
display: flex;
align-items: center;
}

.theme-toggle:hover {
background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle svg {
width: 16px;
height: 16px;
}

.button-group {
display: flex;
gap: 10px;
align-items: center;
}

.right-controls {
display: flex;
align-items: center;
gap: 10px;
}

.icon-button {
background: none;
border: none;
color: #D4D4D4;
cursor: pointer;
display: flex;
align-items: center;
font-size: 25px;
padding: 0 8px;
border-radius: 5px;
transition: background-color 0.3s;
}

.icon-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}

.icon-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.toggle-container {
display: inline-flex;
align-items: center;
border-radius: 6px;
padding: 2px;
border: 1px solid #4B5363;
background-color: #282C34;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-switch {
position: relative;
width: 120px;
height: 26px;
}

.toggle-slider {
position: absolute;
top: 2px;
left: 2px;
width: 58px;
height: 22px;
background-color: #4B5363;
border-radius: 3px;
transition: transform 0.2s ease-in-out;
pointer-events: none;
}

.toggle-labels {
position: absolute;
inset: 0;
display: flex;
}

.toggle-label {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
font-size: 12px;
font-weight: 500;
color: #9DA5B4;
transition: color 0.2s;
cursor: pointer;
}

.toggle-container[aria-pressed="true"] .toggle-slider {
transform: translateX(58px);
}

.toggle-container[aria-pressed="false"] .toggle-label:first-child,
.toggle-container[aria-pressed="true"] .toggle-label:last-child {
color: white;
cursor: default;
}

#save-button {
background-color: transparent;
color: white;
border: none;
padding: 5px 10px;
border-radius: 5px;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
font-size: 14px;
transition: background-color 0.3s;
}

#save-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}

#save-button svg {
width: 18px;
height: 18px;
}

#fullscreen-button {
display: none;
background: none;
border: none;
color: #D4D4D4;
cursor: pointer;
padding: 6px 8px;
border-radius: 5px;
transition: background-color 0.3s;
height: 30px; /* Match height with toggle container */
align-items: center;
justify-content: center;
}

#fullscreen-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}

#fullscreen-button svg {
width: 18px;
height: 18px;
}

.page-content {
    padding: 80px 20px 40px;
    max-width: 950px;
    margin: 0 auto;
    min-height: calc(100vh - 180px); /* Ensures footer stays at bottom */
    color: #D4D4D4;
}
.light-theme .page-content {
    color: #333333;
}

.container {
    background-color: #282c34;
    border-radius: 10px;
    padding: 30px;
    color: #D4D4D4;
}

.light-theme .container {
    background-color: #ffffff;
    color: #333333;
}

h1 {
    margin-bottom: 30px;
}

p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .page-content {
        padding: 70px 15px 30px;
    }
    
    .container {
        padding: 20px;
    }
}
