/* ============================================
   INFO PANEL CUSTOM CSS
   Glass design with white icons and text
   ============================================ */

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== PANEL CONTAINER ===== */
#info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    pointer-events: auto;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 340px;
    min-width: 300px;
    display: none;
    color: white;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    animation: panelSlideIn 0.3s ease-out;
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== CLOSE BUTTON ===== */
#info-panel .panel-close-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#info-panel .panel-close-btn svg {
    stroke: white;
    width: 14px;
    height: 14px;
}

#info-panel .panel-close-btn:hover {
    background: rgba(255, 80, 80, 0.5);
    border-color: rgba(255, 100, 100, 0.6);
    transform: scale(1.1);
}

/* ===== OBJECT INFO SECTION ===== */
#info-panel .object-info {
    margin: 12px 0;
    padding: 0;
}

/* Star Name - Editable */
#info-panel .object-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

#info-panel .object-name-container svg {
    stroke: white;
    flex-shrink: 0;
}

#info-panel .object-name-text {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

#info-panel .object-name-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 180, 255, 0.4);
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: all 0.2s ease;
    display: none;
}

#info-panel .object-name-input:focus {
    border-color: rgba(100, 180, 255, 0.7);
    box-shadow: 0 0 10px rgba(100, 180, 255, 0.2);
}

#info-panel .object-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#info-panel .edit-name-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#info-panel .edit-name-btn:hover {
    background: rgba(100, 180, 255, 0.25);
    border-color: rgba(100, 180, 255, 0.45);
    transform: scale(1.05);
}

#info-panel .edit-name-btn svg {
    width: 16px;
    height: 16px;
    stroke: white;
}

#info-panel .object-type {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: inline-block;
}

#info-panel .object-link {
    color: white;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

#info-panel .object-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

#info-panel .object-link::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
}

/* ===== GLASS BUTTONS ===== */
#info-panel .glass-button {
    background: linear-gradient(135deg, 
        rgba(60, 140, 220, 0.2) 0%, 
        rgba(40, 100, 180, 0.25) 100%);
    border: 1px solid rgba(100, 180, 255, 0.3);
    border-radius: 10px;
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    user-select: none;
    position: relative;
    overflow: hidden;
}

#info-panel .glass-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.4s ease;
}

#info-panel .glass-button:hover::before {
    left: 100%;
}

#info-panel .glass-button:hover {
    background: linear-gradient(135deg, 
        rgba(80, 160, 240, 0.35) 0%, 
        rgba(60, 130, 200, 0.4) 100%);
    border-color: rgba(100, 180, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60, 150, 255, 0.25);
}

#info-panel .glass-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(60, 150, 255, 0.2);
}

#info-panel .glass-button svg {
    width: 18px;
    height: 18px;
    stroke: white;
    transition: stroke 0.2s ease;
}

/* ===== ACTION BUTTONS ===== */
#info-panel .object-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#info-panel .edit-btn {
    flex: 1;
    min-width: 100px;
}

#info-panel .launch-btn {
    flex: 1;
    min-width: 140px;
    background: linear-gradient(135deg, 
        rgba(60, 170, 255, 0.3) 0%, 
        rgba(40, 130, 220, 0.35) 100%);
    border-color: rgba(80, 180, 255, 0.4);
}

#info-panel .launch-btn:hover {
    background: linear-gradient(135deg, 
        rgba(80, 190, 255, 0.45) 0%, 
        rgba(60, 150, 240, 0.5) 100%);
    border-color: rgba(100, 200, 255, 0.6);
    box-shadow: 0 6px 25px rgba(80, 180, 255, 0.3);
}

/* ===== EDIT MODE SECTION ===== */
#info-panel #edit-mode {
    animation: fadeIn 0.2s ease;
}

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

#info-panel .edit-section {
    margin: 16px 0;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#info-panel .edit-section:last-child {
    border-bottom: none;
}

#info-panel .edit-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: white;
}

#info-panel .edit-label::before {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
}

/* Section Icons - WHITE */
#info-panel .edit-section[data-section="glow"] .edit-label::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
    background-size: contain;
}

#info-panel .edit-section[data-section="color"] .edit-label::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z'/%3E%3C/svg%3E");
    background-size: contain;
}

#info-panel .edit-section[data-section="texture"] .edit-label::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-size: contain;
}

#info-panel .edit-section[data-section="size"] .edit-label::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
    background-size: contain;
}

#info-panel .edit-section[data-section="position"] .edit-label::before {
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 9 2 12 5 15'/%3E%3Cpolyline points='9 5 12 2 15 5'/%3E%3Cpolyline points='15 19 12 22 9 19'/%3E%3Cpolyline points='19 9 22 12 19 15'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cline x1='12' y1='2' x2='12' y2='22'/%3E%3C/svg%3E");
    background-size: contain;
}

/* ===== COLOR PICKER ===== */
#info-panel .color-picker {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
}

#info-panel .color-picker:hover {
    border-color: rgba(100, 180, 255, 0.5);
    box-shadow: 0 0 15px rgba(100, 180, 255, 0.2);
}

/* ===== RANGE SLIDER ===== */
#info-panel input[type="range"] {
    width: calc(100% - 50px);
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    outline: none;
    margin-right: 10px;
}

#info-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #80BFFF, #4D9FFF);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(77, 159, 255, 0.4);
    transition: all 0.2s ease;
}

#info-panel input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(77, 159, 255, 0.6);
}

#info-panel input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #80BFFF, #4D9FFF);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(77, 159, 255, 0.4);
}

#info-panel #glow-value, 
#info-panel #size-value {
    font-size: 13px;
    color: white;
    min-width: 35px;
    display: inline-block;
    text-align: left;
    font-weight: 500;
}

/* ===== CHECKBOX ===== */
#info-panel .checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: white;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

#info-panel .checkbox-container:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

#info-panel .checkbox-container input {
    display: none;
}

#info-panel .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    margin-right: 10px;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#info-panel .checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, 
        rgba(80, 160, 255, 0.5) 0%, 
        rgba(60, 140, 230, 0.6) 100%);
    border-color: rgba(100, 180, 255, 0.7);
}

#info-panel .checkbox-container input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== GLOW CONTROLS ===== */
#info-panel .glow-controls {
    margin-top: 8px;
}

#info-panel .glow-intensity {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== TEXTURE UPLOAD ===== */
#info-panel .texture-upload {
    width: 100%;
    padding: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
}

#info-panel .texture-upload:hover {
    border-color: rgba(100, 180, 255, 0.5);
    background: rgba(100, 180, 255, 0.05);
}

#info-panel .texture-upload::file-selector-button {
    background: linear-gradient(135deg, 
        rgba(60, 140, 220, 0.3) 0%, 
        rgba(40, 100, 180, 0.35) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    cursor: pointer;
    margin-right: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
}

#info-panel .texture-btns {
    display: flex;
    gap: 8px;
}

#info-panel .upload-btn,
#info-panel .remove-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

#info-panel .remove-btn {
    background: linear-gradient(135deg, 
        rgba(255, 100, 100, 0.2) 0%, 
        rgba(200, 60, 60, 0.25) 100%);
    border-color: rgba(255, 120, 120, 0.35);
}

#info-panel .remove-btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 120, 120, 0.35) 0%, 
        rgba(220, 80, 80, 0.4) 100%);
    border-color: rgba(255, 140, 140, 0.5);
}

/* ===== POSITION INFO ===== */
#info-panel .position-info {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#info-panel .position-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

#info-panel .axis-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    margin: 0 2px;
}

#info-panel .axis-x { 
    background: rgba(255, 80, 80, 0.2); 
    color: #FF8080;
    border: 1px solid rgba(255, 80, 80, 0.3);
}
#info-panel .axis-y { 
    background: rgba(80, 255, 80, 0.2); 
    color: #80FF80;
    border: 1px solid rgba(80, 255, 80, 0.3);
}
#info-panel .axis-z { 
    background: rgba(80, 130, 255, 0.2); 
    color: #80A0FF;
    border: 1px solid rgba(80, 130, 255, 0.3);
}

/* ===== EDIT ACTIONS ===== */
#info-panel .edit-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#info-panel .save-btn {
    flex: 1;
    min-width: 80px;
    background: linear-gradient(135deg, 
        rgba(80, 200, 120, 0.25) 0%, 
        rgba(60, 160, 100, 0.3) 100%);
    border-color: rgba(100, 220, 140, 0.4);
}

#info-panel .save-btn:hover {
    background: linear-gradient(135deg, 
        rgba(100, 220, 140, 0.4) 0%, 
        rgba(80, 180, 120, 0.45) 100%);
    border-color: rgba(120, 240, 160, 0.55);
    box-shadow: 0 6px 20px rgba(80, 200, 120, 0.25);
}

#info-panel .cancel-btn {
    flex: 1;
    min-width: 80px;
    background: linear-gradient(135deg, 
        rgba(255, 100, 100, 0.2) 0%, 
        rgba(200, 60, 60, 0.25) 100%);
    border-color: rgba(255, 120, 120, 0.35);
}

#info-panel .cancel-btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 120, 120, 0.35) 0%, 
        rgba(220, 80, 80, 0.4) 100%);
    border-color: rgba(255, 140, 140, 0.5);
    box-shadow: 0 6px 20px rgba(255, 100, 100, 0.2);
}

#info-panel .reset-btn {
    flex: 1;
    min-width: 80px;
    background: linear-gradient(135deg, 
        rgba(255, 180, 80, 0.2) 0%, 
        rgba(200, 140, 60, 0.25) 100%);
    border-color: rgba(255, 200, 100, 0.35);
}

#info-panel .reset-btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 200, 100, 0.35) 0%, 
        rgba(220, 160, 80, 0.4) 100%);
    border-color: rgba(255, 220, 120, 0.5);
    box-shadow: 0 6px 20px rgba(255, 180, 80, 0.25);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    #info-panel {
        position: fixed !important;
        bottom: 80px !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
        min-width: auto !important;
        border-radius: 16px;
        padding: 18px;
    }
    
    #info-panel .glass-button {
        min-height: 48px;
        font-size: 14px;
    }
    
    #info-panel .edit-section {
        padding: 12px;
    }
}

/* ===== SCROLLBAR ===== */
#info-panel::-webkit-scrollbar {
    width: 6px;
}

#info-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
