
* {
    font-family: 'Inter', sans-serif;
}

.gradient-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.navy-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.nav-link:hover {
    color: #1e293b;
    transform: translateY(-1px);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.fullscreen-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(30,41,59,0.3);
}

.animated-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-15px,0); }
    70% { transform: translate3d(0,-7px,0); }
    90% { transform: translate3d(0,-2px,0); }
}

.feature-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e293b 100%);
}

/* Responsive iframe */
@media (max-width: 768px) { .game-iframe { height: 300px; } }
@media (min-width: 769px) and (max-width: 1024px) { .game-iframe { height: 400px; } }
@media (min-width: 1025px) { .game-iframe { height: 500px; } }

/* Editor Container */
#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: 45px auto 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;
}

/* Toggle buttons */
.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: #fff;
}

/* Theme toggle */
.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, .right-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Icon buttons */
.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 switch */
.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 */
#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 */
#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;
    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 */
.page-content {
    padding: 80px 20px 40px;
    max-width: 950px;
    margin: 0 auto;
    min-height: calc(100vh - 180px);
    color: #D4D4D4;
}

.light-theme .page-content { color: #333; }

/* Search bar */
#search-container {
    display: flex;
    padding: 10px 0;
    background-color: transparent;
    position: relative;
}

#search-input {
    height: 55px;
    flex-grow: 1;
    padding: 5px;
    font-size: 14px;
    border: 1px solid #3e4451;
    background-color: #282c34;
    color: #D4D4D4;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#search-input:focus {
    outline: none;
    box-shadow: none;
}

#search-button {
    padding: 5px 20px;
    font-size: 14px;
    background-color: #4b5363;
    color: #D4D4D4;
    border: none;
    cursor: pointer;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    justify-content: center;
}

.search-count {
    color: #8db472;
    font-weight: 500;
    margin-right: 4px;
}

.highlighted-line {
    background-color: rgba(255,255,0,0.2);
}
