* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
    height: 100vh;
    width: 100vw;
    position: relative;
}

#universe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#three-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: none;
}

#intro {
    text-align: center;
    z-index: 1;
    animation: fadeIn 2s ease-in-out;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
}

h1 {
    font-size: 3rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

p a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

p a:hover {
    color: #ff00ff;
    text-decoration: underline;
}

.nebula-button, .admin-login-btn {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    border: none;
    color: #000;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
    font-weight: bold;
    margin: 10px;
}

.admin-login-btn {
    background: linear-gradient(45deg, #ff6600, #ffaa00);
}

.nebula-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    animation: rotate 4s linear infinite;
}

.nebula-button:hover, .admin-login-btn:hover {
    transform: scale(1.1);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #00ffff;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.close {
    color: #ff00ff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #00ffff;
}

.form-group {
    margin: 20px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #00ffff;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #00ffff;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.login-btn:hover {
    transform: scale(1.05);
}

.error-msg {
    color: #ff3333;
    margin-top: 10px;
    font-size: 0.9rem;
}

.admin-hint {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

/* Dashboard Styles */
.dashboard {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    border-left: 3px solid #00ffff;
    z-index: 900;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 255, 255, 0.3);
}

.dashboard-header {
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    color: #000;
    font-size: 1.3rem;
}

.logout-btn {
    padding: 8px 20px;
    background: #ff3333;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.logout-btn:hover {
    transform: scale(1.05);
}

.dashboard-tabs {
    display: flex;
    background: #1a1a2e;
    border-bottom: 2px solid #00ffff;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.tab-btn.active, .tab-btn:hover {
    background: #00ffff;
    color: #000;
    font-weight: bold;
}

.dashboard-content {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #00ffff;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff00ff;
    padding-bottom: 10px;
}

.control-group {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #00ffff;
    font-weight: bold;
    font-size: 0.95rem;
}

.control-group input[type="range"] {
    width: 70%;
    margin-right: 10px;
}

.control-group span {
    color: #ff00ff;
    font-weight: bold;
}

.control-group input[type="number"],
.control-group input[type="color"],
.control-group select {
    width: 100%;
    padding: 8px;
    border: 2px solid #00ffff;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.control-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.apply-btn, .action-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.action-btn {
    width: 48%;
    margin: 5px 1%;
    display: inline-block;
}

.action-btn.danger {
    background: linear-gradient(45deg, #ff3333, #ff6666);
    color: #fff;
}

.apply-btn:hover, .action-btn:hover {
    transform: scale(1.05);
}

.stats-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    border-radius: 8px;
}

.stats-panel h4 {
    color: #ff00ff;
    margin-bottom: 10px;
}

.stats-panel p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.stats-panel span {
    color: #00ffff;
    font-weight: bold;
}

#info-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border-radius: 15px;
    display: none;
    z-index: 10;
    max-width: 500px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#info-panel button {
    margin-top: 10px;
    padding: 10px 20px;
    background: #ff00ff;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

#info-panel button:hover {
    background: #00ffff;
    color: #000;
}

#helper-text {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    z-index: 5;
    display: none;
    max-width: 350px;
}

#helper-text.show {
    display: block;
}

.object-marker {
    color: #00ff00;
    font-weight: bold;
}

/* Scrollbar Styling */
.dashboard::-webkit-scrollbar {
    width: 8px;
}

.dashboard::-webkit-scrollbar-track {
    background: #0a0a1a;
}

.dashboard::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
}

.dashboard::-webkit-scrollbar-thumb:hover {
    background: #ff00ff;
}
