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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 50px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px 0;
}

h1 {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 8px;
}

.tagline {
    color: #64748b;
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

.btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background-color: #1d4ed8;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-very-small {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-primary {
    background-color: #059669;
}

.btn-primary:hover {
    background-color: #047857;
}

.btn-secondary {
    background-color: #64748b;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-danger {
    background-color: #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

#user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

#user-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

#user-info a:hover {
    color: #2563eb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-right: 15px;
}

.sort-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.sort-filter-controls label {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.sort-filter-controls select {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background-color: white;
}

.filter-controls {
    display: flex;
    gap: 8px;
    margin-right: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: #e5e7eb;
    color: #374151;
}

.filter-btn:hover {
    background-color: #d1d5db;
}

.filter-btn.active {
    background-color: #2563eb;
    color: white;
}

.section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 40px 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.loading-message, .empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-style: italic;
}

.game-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.game-thumbnail {
    height: 140px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.game-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-info .game-stats {
    position: static;
    background-color: #f3f4f6;
    color: #4b5563;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
    justify-content: space-around;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #111827;
}

.game-author {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-author img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.game-author a {
    color: inherit;
    text-decoration: none;
}

.game-author a:hover {
    text-decoration: underline;
}

.game-description {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
    align-items: center;
}

.upload-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(229, 231, 235, 0.5);
    z-index: 1000;
    pointer-events: none;
}

.progress-bar {
    height: 100%;
    background-color: #10b981;
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 0 2px 2px 0;
}

.upload-status {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(17, 24, 39, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

#game-creator {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    padding: 30px;
    margin-top: 20px;
}

.creator-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    gap: 15px;
}

.creator-header h2 {
    margin-left: 0;
    margin-right: auto;
    font-size: 1.6rem;
    color: #1f2937;
}

.creator-content {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    min-height: 80px;
}

.preview-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.preview-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #1f2937;
}

#preview-frame {
    background-color: #f9fafb;
    min-height: 350px;
    width: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    overflow: auto;
    position: relative;
}

#preview-frame iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.ai-explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #eff6ff;
    border-left: 4px solid #60a5fa;
    border-radius: 0 5px 5px 0;
    font-size: 0.95rem;
    color: #374151;
}

.ai-explanation h4 {
    margin-bottom: 10px;
    color: #3b82f6;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    align-items: center;
    text-align: left;
}

.status-message {
    font-size: 0.9rem;
    color: #6b7280;
    margin-left: 10px;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    transition: color 0.2s, transform 0.1s;
}

.like-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.like-button.liked {
    color: #ef4444;
}

.like-button.liked svg {
    fill: currentColor;
}

.like-button:hover {
    color: #ef4444;
}

.like-button:active {
    transform: scale(1.1);
}

.like-count {
    font-size: 0.85rem;
    color: #6b7280;
    margin-left: 5px;
}

.favorite-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    transition: color 0.2s, transform 0.1s;
}

.favorite-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.favorite-button.favorited {
    color: #f59e0b;
}

.favorite-button.favorited svg {
    fill: currentColor;
}

.favorite-button:hover {
    color: #f59e0b;
}

.favorite-button:active {
    transform: scale(1.1);
}

.ai-model-selector {
    margin-bottom: 20px;
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.ai-model-selector label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.ai-model-selector div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.ai-model-selector div label {
    margin-left: 8px;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.exclusive-models-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.exclusive-models-section h4 {
    margin-bottom: 10px;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.9rem;
}

#model-mdker4 + label {
    color: #059669;
    font-weight: 600;
}

#model-mdker4:disabled + label {
    color: #9ca3af;
    cursor: not-allowed;
}

.early-access-models-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.early-access-models-section h4 {
    margin-bottom: 10px;
    color: #059669;
    font-weight: 600;
    font-size: 0.9rem;
}

.early-access-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 5px;
    font-style: italic;
}

.early-access-note a {
    color: #2563eb;
    text-decoration: none;
}

.early-access-note a:hover {
    text-decoration: underline;
}

.ai-chat-container {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    background-color: #f9fafb;
}

.ai-chat-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #1f2937;
}

.ai-chat-box {
    height: 250px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    background-color: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ai-chat-box .chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    word-wrap: break-word;
}

.ai-chat-box .user-message {
    background-color: #dbeafe;
    text-align: right;
    margin-left: auto;
    max-width: 80%;
}

.ai-chat-box .ai-message {
    background-color: #e5e7eb;
    text-align: left;
    margin-right: auto;
    max-width: 80%;
}

.ai-chat-box .ai-message p {
    margin: 0 0 5px 0;
}

.ai-chat-box .ai-message p:last-child {
    margin-bottom: 0;
}

.ai-chat-box .placeholder-message {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.ai-chat-input-area {
    display: flex;
    gap: 10px;
}

.ai-chat-input-area textarea {
    flex-grow: 1;
    min-height: 50px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.ai-chat-input-area button {
    align-self: flex-end;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0;
}

input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-label {
    font-weight: normal;
    color: #4b5563;
    cursor: pointer;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.storage-usage-container {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.storage-usage-container label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #374151;
}

.storage-progress-bar-bg {
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.storage-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #3b82f6;
    border-radius: 5px;
    transition: width 0.3s ease-out;
}

.storage-usage-text {
    font-size: 0.85rem;
    color: #4b5563;
    text-align: right;
}

.top-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.global-chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: grab; 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    transition: background-color 0.2s, transform 0.1s;
}

.global-chat-toggle-btn:hover {
    background-color: #1d4ed8;
}

.global-chat-toggle-btn:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.global-chat-window {
    position: fixed;
    bottom: 80px; 
    left: 20px;
    width: 320px;
    max-width: 90vw;
    height: 450px;
    max-height: 70vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.global-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.global-chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}
.btn-close:hover {
    color: #1f2937;
}

.global-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 15px;
    background-color: #f9fafb;
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}

.global-chat-message {
    display: flex;
    align-items: flex-start; 
    gap: 8px;
    max-width: 90%; 
}

.global-chat-message .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0; 
    margin-top: 2px; 
}

.message-content {
    background-color: #e5e7eb;
    padding: 8px 12px;
    border-radius: 8px;
    word-wrap: break-word; 
    flex-grow: 1; 
}

.message-content .username {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    display: block;
    margin-bottom: 3px;
}
.message-content .username a {
    color: inherit;
    text-decoration: none;
}
.message-content .username a:hover {
    text-decoration: underline;
}

.message-content .text {
    font-size: 0.95rem;
    color: #1f2937;
    line-height: 1.4;
}

.global-chat-message.self {
    align-self: flex-end; 
    flex-direction: row-reverse; 
}

.global-chat-input-area {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #e5e7eb;
    background-color: #f3f4f6;
}

.global-chat-input-area textarea {
    flex-grow: 1;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.95rem;
    resize: none; 
    margin-right: 10px;
    min-height: 40px; 
}

.global-chat-input-area button {
    align-self: flex-end; 
}

#preview-status {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

.nerdy-stuff-container {
    margin-top: 30px;
    padding-top: 20px;
}

.nerdy-stuff-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #4b5563;
    font-weight: 600;
}

.nerdy-sections {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 30px;
}

@media (min-width: 768px) {
    .nerdy-sections {
        grid-template-columns: repeat(2, 1fr); 
    }
}

.nerdy-section h4 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 5px;
}

.nerdy-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 15px;
}

.code-editor-textarea {
    width: 100%;
    min-height: 400px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background-color: #fdfdfe;
    color: #333;
    resize: vertical;
    margin-bottom: 10px;
}

.save-data-viewer {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9fafb;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    white-space: pre-wrap; 
    word-wrap: break-word; 
    color: #4b5563;
}

.save-data-viewer pre {
    margin: 0 0 10px 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow-x: auto; 
}

#refresh-save-data-btn {
    margin-bottom: 10px;
    float: right; 
}

.admin-panel-btn {
    background-color: #dc2626;
    margin-top: 10px;
    margin-left: 10px;
}

.admin-panel-btn:hover {
    background-color: #b91c1c;
}

.feedback-btn {
    background-color: #7c3aed;
    margin-left: 10px;
}

.feedback-btn:hover {
    background-color: #6d28d9;
}

.settings-window, .admin-panel-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-header, .admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.settings-header h3, .admin-panel-header h3 {
    margin: 0;
    color: #1f2937;
}

.settings-content, .admin-panel-content {
    padding: 20px;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h4 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.setting-label {
    font-weight: 600;
    color: #4b5563;
}

.setting-value {
    color: #6b7280;
    font-family: monospace;
}

.feedbacks-container {
    margin-top: 20px;
}

.feedbacks-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9fafb;
}

.feedback-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feedback-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.feedback-user img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.feedback-rating {
    color: #fbbf24;
    font-size: 1.2rem;
}

.feedback-text {
    color: #4b5563;
    line-height: 1.5;
}

.feedback-date {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 5px;
}

.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.feedback-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.feedback-modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.feedback-modal-body {
    padding: 20px;
}

.rating-section {
    margin-bottom: 20px;
}

.rating-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
}

.star-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s;
}

.star:hover,
.star.active {
    color: #fbbf24;
}

#rating-display {
    font-size: 0.9rem;
    color: #6b7280;
}

.feedback-text-section {
    margin-bottom: 20px;
}

.feedback-text-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.feedback-text-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    resize: vertical;
}

.feedback-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.thumbnail-section {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9fafb;
}

.thumbnail-preview {
    position: relative;
    margin-bottom: 15px;
    display: inline-block;
}

.thumbnail-preview img {
    width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.thumbnail-preview button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
}

.thumbnail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.thumbnail-generation-prompt {
    margin-top: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}

.thumbnail-generation-prompt textarea {
    width: 100%;
    margin-bottom: 10px;
    min-height: 60px;
}

.thumbnail-prompt-actions {
    display: flex;
    gap: 8px;
}

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.tutorial-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.tutorial-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.4rem;
}

.tutorial-body {
    padding: 25px;
    min-height: 300px;
    position: relative;
}

.tutorial-step {
    animation: fadeIn 0.3s ease-out;
}

.tutorial-step h3 {
    color: #2563eb;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-step p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.tutorial-highlight {
    position: absolute;
    pointer-events: none;
    z-index: 2001;
    background-color: rgba(37, 99, 235, 0.1);
    border: 3px solid #2563eb;
    border-radius: 8px;
    padding: 5px;
    animation: pulse 2s infinite;
}

.tutorial-highlight span {
    position: absolute;
    background-color: #2563eb;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tutorial-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    background-color: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.tutorial-progress {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
}

.game-stats {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

.game-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 2px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .tagline {
        font-size: 1rem;
    }
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .action-buttons {
        flex-direction: column;
        align-items: flex-end;
    }
    .status-message {
        margin-left: 0;
        margin-top: 5px;
    }

    .global-chat-toggle-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
    }

    .global-chat-window {
        bottom: 70px;
        left: 15px;
        width: calc(100% - 30px); 
        height: 60vh;
    }

    .tutorial-content {
        width: 95%;
        margin: 10px;
    }
    
    .tutorial-header {
        padding: 15px 20px 12px;
    }
    
    .tutorial-header h2 {
        font-size: 1.2rem;
    }
    
    .tutorial-body {
        padding: 20px;
    }
    
    .tutorial-navigation {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .tutorial-navigation > div:first-child {
        order: 2;
    }
    
    .tutorial-progress {
        order: 1;
    }
    
    .tutorial-navigation > div:last-child {
        order: 3;
    }
}