/* Universe - PNEUOMA Create */

:root {
    --bg-space: #050510;
    --bg-deep: #020208;
    --accent-cosmic: #a78bfa;
    --accent-nebula: #f472b6;
    --accent-star: #fbbf24;
    --accent-life: #4ade80;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Space Grotesk', sans-serif;
    
    --sun-color: #fbbf24;
    --sun-glow: rgba(251, 191, 36, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    font-family: var(--font-body);
    background: var(--bg-space);
    color: var(--text-primary);
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ==================== SCREENS ==================== */

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    z-index: 1;
}

.screen.active {
    display: flex;
}

/* ==================== START SCREEN ==================== */

#start-screen {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.start-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Universe Preview */
.universe-preview {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.preview-sun {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #fff9c4 0%, #ffd54f 30%, #ff9800 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 193, 7, 0.6), 0 0 80px rgba(255, 152, 0, 0.3);
}

.preview-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.orbit-1 { width: 100px; height: 100px; margin: -50px 0 0 -50px; animation: orbitRotate 8s linear infinite; }
.orbit-2 { width: 140px; height: 140px; margin: -70px 0 0 -70px; animation: orbitRotate 12s linear infinite reverse; }
.orbit-3 { width: 180px; height: 180px; margin: -90px 0 0 -90px; animation: orbitRotate 16s linear infinite; }

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preview-planet {
    position: absolute;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.p1 { width: 15px; height: 15px; top: -7px; left: 50%; margin-left: -7px; background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.p2 { width: 12px; height: 12px; top: 50%; right: -6px; margin-top: -6px; background: linear-gradient(135deg, #4ade80, #22c55e); }
.p3 { width: 18px; height: 18px; bottom: -9px; left: 50%; margin-left: -9px; background: linear-gradient(135deg, #f472b6, #ec4899); }

.title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-cosmic) 50%, var(--accent-nebula) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-cosmic);
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.start-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    color: var(--bg-space);
    background: linear-gradient(135deg, var(--accent-cosmic) 0%, var(--accent-nebula) 100%);
}

.primary-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(167, 139, 250, 0.4);
}

.secondary-btn {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cosmic);
}

/* My Universes */
.my-universes {
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px;
}

.my-universes h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

.universe-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.universe-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.universe-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.universe-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.universe-item-icon.yellow { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.universe-item-icon.orange { background: linear-gradient(135deg, #fb923c, #ea580c); }
.universe-item-icon.red { background: linear-gradient(135deg, #f87171, #dc2626); }
.universe-item-icon.blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.universe-item-icon.white { background: linear-gradient(135deg, #ffffff, #e5e7eb); }
.universe-item-icon.purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

.universe-item-name {
    font-weight: 500;
}

.universe-item-planets {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.universe-item-arrow {
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

/* ==================== UNIVERSE SCREEN ==================== */

#universe-screen {
    background: radial-gradient(ellipse at center, rgba(10, 10, 30, 0.9) 0%, var(--bg-space) 100%);
}

.universe-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--safe-top) + 10px) 15px 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    z-index: 10;
}

.icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.music-btn.playing {
    background: rgba(167, 139, 250, 0.3);
}

.universe-info {
    text-align: center;
}

.universe-info h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.universe-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.universe-code code {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--accent-cosmic);
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.copy-btn:hover {
    opacity: 1;
}

/* Solar System */
.solar-system-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.solar-system {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    max-height: 600px;
}

/* Sun */
.sun {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.sun-core {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, 
        #fff9c4 0%, 
        var(--sun-color) 40%, 
        color-mix(in srgb, var(--sun-color) 70%, #000) 100%);
    border-radius: 50%;
    animation: sunPulse 4s ease-in-out infinite;
}

.sun-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--sun-glow) 0%, transparent 70%);
    animation: sunGlow 3s ease-in-out infinite alternate;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sunGlow {
    0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.2); }
}

/* Orbital Rings */
.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.ring-1 { width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.ring-2 { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
.ring-3 { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
.ring-4 { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
.ring-5 { width: 360px; height: 360px; margin: -180px 0 0 -180px; }
.ring-6 { width: 420px; height: 420px; margin: -210px 0 0 -210px; }

/* Planets Container */
.planets-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Individual Planet in Orbit */
.orbiting-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.orbiting-planet:hover {
    filter: brightness(1.2);
}

.orbiting-planet.selected {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.planet-body {
    border-radius: 50%;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.4),
                inset 3px 3px 8px rgba(255, 255, 255, 0.2);
    position: relative;
}

.planet-body::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
}

.planet-name-tag {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.orbiting-planet:hover .planet-name-tag {
    opacity: 1;
}

/* Planet terrain colors */
.terrain-earth { background: linear-gradient(135deg, #6ee7b7 0%, #34d399 40%, #059669 100%); }
.terrain-ocean { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 40%, #1d4ed8 100%); }
.terrain-desert { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 40%, #d97706 100%); }
.terrain-ice { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 40%, #7dd3fc 100%); }
.terrain-volcanic { background: linear-gradient(135deg, #fca5a5 0%, #ef4444 40%, #b91c1c 100%); }
.terrain-crystal { background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 40%, #9333ea 100%); }

/* Planet Info Panel */
.planet-info-panel {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 350px;
    background: rgba(10, 10, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    z-index: 20;
}

.planet-info-panel.hidden {
    display: none;
}

.close-panel-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.planet-info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.planet-info-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ee7b7, #059669);
}

.planet-info-text h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.planet-info-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.planet-info-details {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.85rem;
}

.planet-info-actions {
    display: flex;
    gap: 10px;
}

.planet-info-actions .action-btn {
    flex: 1;
}

/* Universe Actions */
.universe-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px calc(var(--safe-bottom) + 15px);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    z-index: 10;
}

.action-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cosmic);
}

.pill-icon {
    font-size: 1.1rem;
}

/* Members Panel */
.members-panel {
    position: absolute;
    top: 80px;
    right: 15px;
    width: 250px;
    background: rgba(10, 10, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    backdrop-filter: blur(20px);
    z-index: 20;
}

.members-panel.hidden {
    display: none;
}

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

.members-header h3 {
    font-size: 0.9rem;
    font-weight: 500;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cosmic), var(--accent-nebula));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.member-planets {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.member-host {
    font-size: 0.7rem;
    color: var(--accent-star);
    background: rgba(251, 191, 36, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==================== MODALS ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-space);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    max-width: 100%;
    width: 380px;
    text-align: center;
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.modal-content input {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--accent-cosmic);
}

.code-input {
    font-family: monospace;
    font-size: 1.5rem !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Sun Options */
.sun-options {
    margin-bottom: 20px;
    text-align: left;
}

.sun-options label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sun-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sun-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sun-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sun-btn.active {
    border-color: var(--accent-cosmic);
    background: rgba(167, 139, 250, 0.15);
}

.sun-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 0 15px currentColor;
}

.sun-preview.yellow { background: radial-gradient(circle, #fff9c4, #fbbf24); color: rgba(251, 191, 36, 0.5); }
.sun-preview.orange { background: radial-gradient(circle, #fed7aa, #f97316); color: rgba(249, 115, 22, 0.5); }
.sun-preview.red { background: radial-gradient(circle, #fecaca, #ef4444); color: rgba(239, 68, 68, 0.5); }
.sun-preview.blue { background: radial-gradient(circle, #bfdbfe, #3b82f6); color: rgba(59, 130, 246, 0.5); }
.sun-preview.white { background: radial-gradient(circle, #ffffff, #e5e7eb); color: rgba(255, 255, 255, 0.5); }
.sun-preview.purple { background: radial-gradient(circle, #e9d5ff, #a855f7); color: rgba(168, 85, 247, 0.5); }

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-cosmic), var(--accent-nebula));
    color: white;
    font-weight: 600;
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-divider {
    color: var(--text-muted);
    margin: 15px 0;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

/* Saved Items */
.saved-planets, .saved-creatures {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.saved-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cosmic);
}

.saved-item-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.saved-item-name {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-primary);
}

.create-new-btn {
    display: block;
    padding: 14px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    color: var(--accent-life);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.create-new-btn:hover {
    background: rgba(74, 222, 128, 0.2);
}

/* Invite Display */
.invite-code-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.invite-code-display code {
    font-family: monospace;
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: var(--accent-cosmic);
}

.invite-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.invite-actions .action-btn {
    flex: 1;
}

.action-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cosmic);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(74, 222, 128, 0.9);
    color: #000;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 200;
    animation: toastIn 0.3s ease;
}

.toast.hidden {
    display: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== RESPONSIVE ==================== */

/* Mobile fixes - ensure save buttons are visible */
@media (max-width: 767px) {
    .planet-info-panel {
        bottom: 80px;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .planet-info-actions {
        position: sticky;
        bottom: 0;
        background: rgba(10, 10, 30, 0.98);
        padding: 15px 0 0;
        margin-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .universe-actions {
        flex-wrap: wrap;
    }
    
    .universe-actions .action-btn {
        flex: 1 1 45%;
    }
}

@media (min-width: 768px) {
    .sun-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .saved-planets, .saved-creatures {
        grid-template-columns: repeat(3, 1fr);
    }
}

