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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    height: 100vh;
    user-select: none;
}

/* Public Cover Gate */
.public-gate {
    position: fixed;
    inset: 0;
    z-index: 30000;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 25%, #c73e1d 50%, #6b3fa0 75%, #2d1b69 100%);
    background-size: 400% 400%;
    animation: makerprint-gradient 15s ease infinite;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 20px 20px;
    overflow-y: auto;
}

@keyframes makerprint-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.public-gate-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 170px;
    height: auto;
    opacity: 0.95;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.public-gate-main {
    min-height: 62vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
}

.public-gate-logo {
    width: min(400px, 85vw);
    height: auto;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    animation: scale-in 0.8s ease-out;
}

@keyframes scale-in {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.public-gate-title {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    animation: fade-in 1s ease-out 0.2s both;
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.public-gate-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(14px, 2.2vw, 18px);
    max-width: 760px;
    animation: fade-in 1s ease-out 0.4s both;
}

.public-gate-rsvp {
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: #1f2937;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fade-in 1s ease-out 0.6s both;
}

.public-gate-rsvp:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.3);
}

.public-gate-faq {
    width: min(980px, 100%);
    margin: 24px auto 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(8px);
    animation: slide-up 0.8s ease-out 0.8s both;
}

@keyframes slide-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.public-gate-faq h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.public-gate-faq-item {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.public-gate-faq-item:first-of-type {
    border-top: none;
}

.public-gate-faq-q {
    font-weight: 700;
    margin-bottom: 6px;
}

.public-gate-faq-a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

/* Sign-up Page */
.signup-page {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    padding: 40px 20px;
}

.signup-page.hidden {
    display: none;
}

.signup-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-image {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.signup-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    text-align: center;
}

.signup-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.faq-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.faq-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-answer {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    padding-left: 30px;
}

/* Desktop */
.desktop {
    width: 100%;
    height: calc(100vh - 50px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.desktop.hidden {
    display: none;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.desktop-icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    border-radius: 8px;
    transition: background 0.2s;
    position: absolute;
    pointer-events: auto;
}

.desktop-icon.dragging {
    cursor: grabbing;
    opacity: 0.7;
    z-index: 9999;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.desktop-icon:active {
    background: rgba(255, 255, 255, 0.3);
}

.icon {
    width: 48px;
    height: 48px;
    font-size: 32px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.icon-label {
    color: white;
    font-size: 12px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Windows */
.window {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
    min-height: 300px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.window.active {
    display: flex;
    z-index: 1000;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 50px) !important;
    border-radius: 0;
}

.window.minimized {
    display: none;
}

.window-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-title {
    font-weight: 600;
    font-size: 14px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.window-control.minimize {
    background: #f59e0b;
}

.window-control.maximize {
    background: #10b981;
}

.window-control.close {
    background: #ef4444;
}

.window-control:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.window-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    background: #f9fafb;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
}

.taskbar.hidden {
    display: none;
}

.start-button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.taskbar-apps {
    display: flex;
    gap: 8px;
    flex: 1;
}

.taskbar-app {
    height: 40px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.taskbar-app:hover {
    background: rgba(255, 255, 255, 0.2);
}

.taskbar-app.active {
    background: rgba(255, 255, 255, 0.25);
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 60px;
    left: 10px;
    width: 320px;
    background: rgba(40, 40, 40, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10001;
}

.start-menu.active {
    display: flex;
}

.start-menu-item {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: background 0.2s;
    text-align: left;
}

.start-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.start-menu-item .icon {
    width: 32px;
    height: 32px;
    font-size: 20px;
    margin: 0;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(40, 40, 40, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    min-width: 200px;
}

.context-menu.active {
    display: flex;
}

.context-menu-item {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    text-align: left;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.window.active {
    animation: fadeIn 0.2s ease-out;
}

/* App-specific content */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.file-item:hover {
    background: #e5e7eb;
}

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

.settings-section h3 {
    margin-bottom: 12px;
    color: #374151;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
}

.toggle {
    width: 48px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: #667eea;
}

.toggle::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle.active::after {
    transform: translateX(24px);
}

.terminal-content {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    padding: 16px;
    height: 100%;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 4px;
}

.terminal-prompt {
    color: #4ec9b0;
}

.browser-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.browser-button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.browser-button:hover {
    background: #e5e7eb;
}

.browser-url {
    flex: 1;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.browser-content {
    padding: 20px;
    background: white;
    height: calc(100% - 57px);
    overflow-y: auto;
}

/* Shop */
.shop-header {
    padding: 20px;
    background: white;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coins-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.coins-icon {
    font-size: 24px;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
}

.prize-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.prize-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.prize-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.prize-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.prize-description {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.prize-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
}

.redeem-button {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.redeem-button:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.redeem-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Maker coins display in taskbar */
.coins-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    margin-right: 10px;
}

.coins-display-icon {
    font-size: 16px;
}

/* Explore & Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.project-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.project-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.project-author {
    font-size: 12px;
    color: #6b7280;
}

.project-description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-link {
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    transition: background 0.2s;
}

.project-link:hover {
    background: #e5e7eb;
}

.project-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.create-project-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

.project-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: white;
    border-top: 2px solid #e5e7eb;
}

.action-button {
    flex: 1;
    padding: 12px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.action-button:hover {
    background: #667eea;
    color: white;
}

.action-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 16px;
}
