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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

#canvas3d {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#canvas3d:active {
    cursor: grabbing;
}

.nucleus {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.4s ease;
    pointer-events: auto;
    background: transparent;
}

.nucleus:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.nucleus.layer-2:hover {
}

#nucleusText {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

#photoModal .modal-close {
    position: fixed;
    right: 20px;
    top: 20px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    transition: all 0.3s;
}

#photoModal .modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.photo-modal-content {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 0;
}

.photo-modal-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #000;
}

.photo-modal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-modal-info {
    width: 400px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    overflow-y: auto;
    color: #fff;
}

.photo-modal-info h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.photo-modal-info p {
    margin: 0 0 10px 0;
    color: rgba(255,255,255,0.8);
}

.comments-section {
    margin-top: 30px;
}

.comments-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.comments-section textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.comments-section button {
    margin-top: 10px;
    padding: 10px 20px;
    background: #4a90e2;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.comments-section button:hover {
    background: #357abd;
}

.modal-content {
    position: relative;
    margin: 10vh auto;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.user-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 500;
}

.user-button {
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(0,0,0,0.8);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    min-width: 150px;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

.add-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(0,0,0,0.8);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 500;
}

.add-button:hover {
    background: rgba(0,0,0,0.9);
}

.edit-button {
    position: fixed;
    bottom: 30px;
    right: 100px;
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(0,0,0,0.8);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 500;
}

.edit-button:hover {
    background: rgba(0,0,0,0.9);
}

#momentForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#momentForm input {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

#momentForm input[type="text"] {
    text-transform: capitalize;
}

#momentForm input:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#momentForm input::placeholder {
    color: rgba(255,255,255,0.5);
}

#momentForm input[type="file"] {
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

#momentForm input[type="file"]:hover {
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#momentForm input[type="file"]::file-selector-button {
    padding: 8px 15px;
    background: rgba(74, 144, 226, 0.3);
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    margin-right: 10px;
}

#momentForm input[type="file"]::file-selector-button:hover {
    background: rgba(74, 144, 226, 0.5);
}

#momentForm button {
    padding: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

#momentForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}

#momentForm button:active {
    transform: translateY(0);
}

#photoForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#photoForm input,
#photoForm textarea {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
}

#photoForm input[type="text"] {
    text-transform: capitalize;
}

#photoForm input:focus,
#photoForm textarea:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#photoForm input::placeholder,
#photoForm textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

#photoForm input[type="file"] {
    padding: 10px;
    border: 2px dashed rgba(255,255,255,0.3);
    cursor: pointer;
}

#photoForm input[type="file"]:hover {
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#photoForm button {
    padding: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

#photoForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}

#photoForm button:active {
    transform: translateY(0);
}

#configForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#configForm input,
#configForm select {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

#configForm input[type="text"] {
    text-transform: capitalize;
}

#configForm input:focus,
#configForm select:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#configForm select option {
    background: #1a1a2e;
    color: #fff;
}

#configForm button {
    padding: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

#configForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}

#configForm button:active {
    transform: translateY(0);
}

#newUniversoForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#newUniversoForm input,
#newUniversoForm select {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

#newUniversoForm input[type="text"] {
    text-transform: capitalize;
}

#newUniversoForm input:focus,
#newUniversoForm select:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#newUniversoForm select option {
    background: #1a1a2e;
    color: #fff;
}

#newUniversoForm button {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

#newUniversoForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

#newUniversoForm button:active {
    transform: translateY(0);
}

#editMomentoForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#editMomentoForm input,
#editMomentoForm select {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

#editMomentoForm input[type="text"] {
    text-transform: capitalize;
}

#editMomentoForm input:focus,
#editMomentoForm select:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255,255,255,0.1);
}

#editMomentoForm select option {
    background: #1a1a2e;
    color: #fff;
}

#editMomentoForm button {
    padding: 15px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

#editMomentoForm button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
}

#editMomentoForm button:active {
    transform: translateY(0);
}

.drop-area {
    border: 3px dashed rgba(255,255,255,0.3);
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255,255,255,0.02);
}

.drop-area:hover,
.drop-area.drag-over {
    border-color: #4a90e2;
    background: rgba(74,144,226,0.1);
}

.drop-area p {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 48px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 420px;
}

@media (max-width: 768px) {
    .modal-next {
        right: 20px;
    }
}

.modal-body {
    color: #fff;
}

.modal-body h2 {
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
    color: #fff;
}

@media (max-width: 768px) {
    .photo-modal-content {
        flex-direction: column;
    }
    
    .photo-modal-info {
        width: 100%;
        height: 50vh;
    }
    
    .photo-modal-image {
        height: 50vh;
    }
    .modal-content {
        width: 95%;
        margin: 5vh auto;
        padding: 20px;
    }
    
    .user-menu {
        top: 10px;
        right: 10px;
    }
    
    .user-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .add-button {
        bottom: 20px;
        right: 20px;
        padding: 10px 18px;
        font-size: 24px;
    }
    
    #momentForm input,
    #momentForm button,
    #photoForm input,
    #photoForm textarea,
    #photoForm button {
        padding: 12px;
        font-size: 14px;
    }
    
    .modal-body h2 {
        font-size: 20px;
    }
}
