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

body {
    font-family: 'Quicksand', 'Comfortaa', sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    overflow: hidden;
}

/* LOADING SCREEN - All smooth and round */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.cosmic-orb {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(157, 78, 221, 0.2);
    border-top-color: #9d4edd;
    border-radius: 50%; /* Perfect circle */
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    color: #9d4edd;
    margin-bottom: 10px;
    font-weight: 500;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #888;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* TOP BAR - Flowing design */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.8) 0%, rgba(10, 10, 15, 0) 100%);
    backdrop-filter: blur(10px);
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #9d4edd, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    font-family: 'Comfortaa', sans-serif;
}

.top-controls {
    display: flex;
    gap: 10px;
}

/* ORB BUTTONS - Perfect circles only */
.orb-btn {
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.4);
    color: #fff;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Perfect circle */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-btn:hover {
    background: rgba(157, 78, 221, 0.4);
    border-color: #9d4edd;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(157, 78, 221, 0.4);
}

/* CLOCK DISPLAY - Smooth, flowing text */
#clock-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.time-display {
    font-size: 6rem;
    font-weight: 700;
    font-family: 'Comfortaa', 'Quicksand', sans-serif; /* Rounded font */
    background: linear-gradient(135deg, #9d4edd, #d946ef, #6b2c91);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 12px;
    animation: glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(157, 78, 221, 0.8)) drop-shadow(0 0 60px rgba(157, 78, 221, 0.4));
}

@keyframes glow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 30px rgba(157, 78, 221, 0.8)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 40px rgba(157, 78, 221, 1)); }
}

.date-display {
    font-size: 1.2rem;
    color: #d946ef;
    margin-top: 10px;
    letter-spacing: 2px;
    opacity: 0.9;
    font-weight: 500;
}

/* COSMIC INSIGHTS - Bubble design, NO squares */
#cosmic-insights {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(26, 26, 46, 0.3);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 40px; /* Extreme rounding */
    padding: 25px 30px;
    animation: bubbleUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(157, 78, 221, 0.2);
}

@keyframes bubbleUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

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

.bubble-header h3 {
    font-size: 1.1rem;
    color: #9d4edd;
    font-weight: 600;
}

/* REFRESH ORB - Perfect circle */
.refresh-orb {
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.4);
    color: #fff;
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Perfect circle */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.refresh-orb:hover {
    background: rgba(157, 78, 221, 0.4);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.5);
}

.insight-content {
    min-height: 60px;
}

.cosmic-fact {
    font-size: 1rem;
    line-height: 1.7;
    color: #e0e0ff;
}

.loading-insight {
    color: #888;
    font-style: italic;
}

/* BOTTOM BAR - Flowing design */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(0deg, rgba(10, 10, 15, 0.8) 0%, rgba(10, 10, 15, 0) 100%);
    backdrop-filter: blur(10px);
}

/* PILL SHAPES - Rounded rectangles */
.info-pill {
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.3);
    padding: 8px 20px;
    border-radius: 25px; /* Pill shape */
    font-size: 0.9rem;
    color: #d946ef;
    backdrop-filter: blur(5px);
}

.berrry-bubble {
    background: rgba(217, 70, 239, 0.2);
    border: 2px solid rgba(217, 70, 239, 0.3);
    padding: 8px 20px;
    border-radius: 25px; /* Pill shape */
    color: #d946ef;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.berrry-bubble:hover {
    background: rgba(217, 70, 239, 0.3);
    border-color: #d946ef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 70, 239, 0.4);
}

/* MODAL - Smooth, rounded design */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid rgba(157, 78, 221, 0.4);
    border-radius: 30px; /* Extreme rounding */
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(157, 78, 221, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid rgba(157, 78, 221, 0.3);
}

.modal-header h2 {
    font-size: 1.4rem;
    color: #9d4edd;
    font-weight: 600;
}

/* CLOSE ORB - Perfect circle */
.close-orb {
    background: rgba(157, 78, 221, 0.2);
    border: 2px solid rgba(157, 78, 221, 0.4);
    color: #fff;
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Perfect circle */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-orb:hover {
    background: rgba(157, 78, 221, 0.4);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.5);
}

.modal-body {
    padding: 25px 30px;
}

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

.bubble-label {
    display: flex;
    align-items: center;
    color: #e0e0ff;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 20px; /* Rounded label */
    transition: background 0.3s ease;
}

.bubble-label:hover {
    background: rgba(157, 78, 221, 0.1);
}

.bubble-label input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.setting-group label {
    display: block;
    color: #e0e0ff;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* SLIDER CONTAINER */
.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.setting-group input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 10px; /* Rounded slider track */
    background: rgba(157, 78, 221, 0.2);
    outline: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%; /* Circular thumb */
    background: #9d4edd;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.5);
}

.setting-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%; /* Circular thumb */
    background: #9d4edd;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.5);
}

.value-pill {
    background: rgba(157, 78, 221, 0.2);
    color: #9d4edd;
    padding: 4px 12px;
    border-radius: 15px; /* Pill shape */
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

/* BUBBLE SELECT */
.bubble-select {
    width: 100%;
    padding: 12px 18px;
    background: rgba(157, 78, 221, 0.1);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 20px; /* Rounded select */
    color: #fff;
    margin-top: 8px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
}

.bubble-select:hover {
    background: rgba(157, 78, 221, 0.15);
    border-color: rgba(157, 78, 221, 0.5);
}

.bubble-select:focus {
    outline: none;
    border-color: #9d4edd;
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

/* RESPONSIVE - Maintain smooth, round design */
@media (max-width: 768px) {
    .time-display {
        font-size: 3.5rem;
        letter-spacing: 6px;
    }
    
    .date-display {
        font-size: 1rem;
    }
    
    .app-title {
        font-size: 1.2rem;
    }
    
    #cosmic-insights {
        width: 95%;
        padding: 20px;
        bottom: 80px;
        border-radius: 30px;
    }
    
    .cosmic-fact {
        font-size: 0.9rem;
    }
    
    .orb-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .time-display {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }
    
    .modal-content {
        border-radius: 25px;
    }
}

/* Smooth scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(157, 78, 221, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.4);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.6);
}