/* Basic styles */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #ecf0f1;
    --background-dark: #0f1624;
    --background-light: #1b2838;
    --joy-color: #f1c40f;
    --sadness-color: #3498db;
    --anger-color: #e74c3c;
    --fear-color: #9b59b6;
    --surprise-color: #1abc9c;
    --love-color: #e84393;
}

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

body {
    font-family: sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-y: auto;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
    overflow-y: visible;
}

/* Canvas Background */
#demo-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none; 
    touch-action: none;
}

h1, h2, h3 {
    margin-bottom: 15px;
    font-weight: normal;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 20px;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
    color: #fff;
}

header p {
    text-align: center;
    font-size: 1.2rem;
    color: rgb(31, 166, 250);
    margin-bottom: 30px;
    text-shadow: 0 0 8px rgba(31, 166, 250, 0.5);
}

.main-nav {
    margin-bottom: 40px;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
}

.main-nav .nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.main-nav .nav-link:hover {
    background-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.main-nav .nav-link.active {
    background-color: var(--accent-color);
}


.page {
    display: none;
    overflow-y: auto;
    max-height: 100%;
    padding-bottom: 20px;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

.mood-input {
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    overflow-y: visible;
}

.mood-input h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.mood-category {
    margin-bottom: 20px;
}

.mood-category h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #3498db;
    text-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.mood-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.mood-button {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: white;
    font-size: 1.1rem;
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.mood-button:hover {
    transform: translateY(-3px);
    background-color: rgba(52, 152, 219, 0.2);
}

.mood-button.selected {
    transform: translateY(-3px);
}

.mood-joy {
    border-color: var(--joy-color);
}

.mood-sadness {
    border-color: var(--sadness-color);
}

.mood-anger {
    border-color: var(--anger-color);
}

.mood-fear {
    border-color: var(--fear-color);
}

.mood-surprise {
    border-color: var(--surprise-color);
}

.mood-love {
    border-color: var(--love-color);
}

.mood-button span {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}

/* Visualization section */
.visualization {
    margin-bottom: 30px;
}

.star-chart {
    background: rgba(15, 23, 42, 0.6);
    height: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 15px;
}

/* Star chart legends'style */
.star-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-dot.recent {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.legend-dot.older {
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.history {
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.history h2 {
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background-color: rgba(15, 23, 42, 0.9);
    padding: 10px 0;
    z-index: 2;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #3498db rgba(255, 255, 255, 0.1);
}

.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.history-entry {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.2s;
}

.history-entry:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.history-entry:last-child {
    border-bottom: none;
}

.entry-date {
    width: 120px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.entry-mood {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.mood-indicator {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.delete-entry {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: all 0.2s;
    padding: 5px;
    margin-left: 10px;
}

.delete-entry:hover {
    opacity: 1;
    transform: scale(1.1);
}

.feedback-container {
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

#mood-insights {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.insight-item {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.07);
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.insight-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.insight-item h4 {
    margin-bottom: 10px;
    color: #3498db;
    font-size: 20px;
}

.insight-item.warning {
    border-left-color: var(--anger-color);
}

.insight-item.warning h4 {
    color: var(--anger-color);
}

.insight-item.positive {
    border-left-color: var(--joy-color);
}

.insight-item.positive h4 {
    color: var(--joy-color);
}

.no-insights {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}

#mood-trends {
    margin-top: 30px;
}

.trend-chart {
    height: 200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 15px;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    gap: 10px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
}

.trend-bar {
    flex: 1;
    background-color: var(--accent-color);
    border-radius: 5px 5px 0 0;
    transition: height 0.5s;
    position: relative;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.trend-bar::after {
    content: attr(data-emotion);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #7f8c8d;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    color: #7f8c8d;
}

/* Mobile styles */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        overflow-y: visible;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav .nav-link {
        display: block;
        text-align: center;
    }

    .mood-input {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mood-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .mood-button {
        padding: 10px;
        min-width: auto;
        font-size: 0.9rem;
    }

    .mood-button span {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .star-chart {
        height: 350px;
    }
    
    .history {
        padding: 15px;
    }
    
    .history-entry {
        padding: 10px;
    }
    
    .entry-date {
        width: 80px;
        font-size: 0.8rem;
    }
    
    .entry-mood {
        font-size: 0.9rem;
    }
    
    .mood-indicator {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    .delete-entry {
        font-size: 1rem;
        padding: 3px;
    }
    
    .primary-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    footer {
        margin-top: 15px;
        padding: 15px 0;
        font-size: 0.8rem;
    }
}
.page {
    padding-bottom: 40px;
}

main {
    overflow-y: visible;
}

/* Also fromhttps://codepen.io/micobytes/pen/aZjXxY */
.large-header {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: rgb(1, 11, 33);
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    z-index: 1;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.background-star {
    z-index: 2;
}

.mood-star {
    z-index: 3;
}

/* for mobile size changed */
@media (max-width: 375px) {
    body {
        overflow-y: auto !important;
    }

    .container {
        padding: 8px;
        overflow-y: visible !important;
    }
    
    h1 {
        font-size: 1.3rem;
        margin-top: 8px;
        margin-bottom: 8px;
    }
    
    header p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .main-nav {
        margin-bottom: 20px;
    }
    
    .main-nav .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .mood-input {
        padding: 12px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .mood-input h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .mood-category h3 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .mood-category {
        margin-bottom: 15px;
    }
    
    .mood-buttons {
        max-height: none;
        overflow-y: visible;
    }
    
    .mood-button {
        padding: 8px 5px;
        font-size: 0.8rem;
        border-radius: 8px;
        border-width: 2px;
    }
    
    .mood-button span {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .intensity-slider {
        margin: 8px 0;
        padding: 0 5px;
    }
    
    input[type="range"] {
        height: 8px;
        margin: 10px 0;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .intensity-labels {
        font-size: 0.8rem;
    }
    
    .primary-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        margin-top: 15px;
        border-radius: 20px;
    }
    
    .star-chart {
        height: 250px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .star-legend {
        margin-top: 10px;
        gap: 15px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
    
    .history {
        padding: 10px;
        margin-bottom: 20px;
    }
    
    .history h2 {
        padding: 8px 0;
        font-size: 1.1rem;
    }
    
    .history-list {
        max-height: 180px;
        overflow-y: auto !important;
    }
    
    .history-entry {
        padding: 8px;
    }
    
    .entry-date {
        width: 70px;
        font-size: 0.7rem;
    }
    
    .entry-mood {
        font-size: 0.8rem;
    }
    
    .mood-indicator {
        width: 16px;
        height: 16px;
        font-size: 12px;
        margin-right: 6px;
    }
    
    .feedback-container {
        padding: 12px;
        overflow-y: visible;
    }
    
    #mood-insights {
        padding: 12px;
        max-height: none;
        overflow-y: visible;
    }
    
    .insight-item {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
    }
    
    .insight-item h4 {
        font-size: 1rem;
    }
    
    .insight-item p {
        font-size: 0.8rem;
    }
    
    .page {
        overflow-y: visible !important;
        padding-bottom: 50px;
    }
    
    #star-page {
        min-height: calc(100vh - 180px);
    }
    
    #feedback-page {
        min-height: calc(100vh - 180px);
    }
    
    #mood-insights, .trend-chart {
        border-radius: 8px;
        padding: 12px;
    }
    
    .trend-chart {
        height: 150px;
        padding: 10px 8px;
        gap: 5px;
        margin-top: 10px;
    }
    
    footer {
        margin-top: 20px;
        padding: 10px 0;
    }
    
    .container {
        padding-bottom: 20px;
    }
    
    .mood-buttons {
        gap: 6px;
    }
    
    .history-list::-webkit-scrollbar {
        width: 5px;
    }
    
    .feedback-container {
        margin-bottom: 20px;
    }
    
    .mood-star {
        z-index: 5;
    }
}

.large-header {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    z-index: 1;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.background-star {
    z-index: 2;
}

.mood-star {
    z-index: 5;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 1 !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 25px currentColor !important;
}

.mood-star:hover {
    transform: scale(1.8) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 35px currentColor !important;
    z-index: 10;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    50% { opacity: 0.8; }
    100% { opacity: 0.2; }
}

/* css */
/* Header */
.large-header {
	position: relative;
	width: 100%;
	background: #333;
	overflow: hidden;
	background-size: cover;
	background-position: center center;
	z-index: 1;
}

#large-header {
	background-image: url('https://www.marcoguglie.it/Codepen/AnimatedHeaderBg/demo-1/img/demo-1-bg.jpg');
}

.main-title {
	position: absolute;
	margin: 0;
	padding: 0;
	color: #f9f1e9;
	text-align: center;
	top: 50%;
	left: 50%;
	-webkit-transform: translate3d(-50%,-50%,0);
	transform: translate3d(-50%,-50%,0);
}

#horoscope{
	color: black;
	text-align: center;
}

#btn{
	background-color: grey;
	margin-top: 15px;
	margin-bottom: 30px;
}

#symbols{
	margin-bottom: -20px;
}

.demo-1 .main-title {
	text-transform: uppercase;
	font-size: 4.2em;
	letter-spacing: 0.1em;
}

.main-title .thin {
	font-weight: 200;
}

@media only screen and (max-width : 768px) {
	.demo-1 .main-title {
		font-size: 3em;
	}
}

.intensity-slider {
    width: 100%;
    margin: 20px 0;
    padding: 0 10px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: linear-gradient(to right, #1a2a3a, #3498db);
    border-radius: 5px;
    outline: none;
    margin: 15px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.7);
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #3498db;
    transform: scale(1.1);
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 1rem;
    color: #bbb;
}

/* 主按钮样式 */
.primary-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
    display: block;
    margin: 30px auto 0;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.primary-button:hover {
    background: linear-gradient(135deg, #3498db, #1abc9c);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
}

.primary-button:active {
    transform: translateY(1px);
}