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

:root {
    --bg-color: #121212;
    --nav-bg-color: #1f1f1f;
    --card-bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --primary-color: #03dac6;
    --secondary-color: #3700b3;
    --icon-color: #b0b0b0;
    --icon-hover-color: #03dac6;
    --link-hover-color: #03dac6;
    --border-color: #333333;
    --input-bg: #2c2c2c;
    --input-text: #e0e0e0;
    --button-bg: #03dac6;
    --button-text: #000000;
    --button-hover-bg: #018786;
    --scroll-track: #1f1f1f;
    --scroll-thumb: #444444;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --typing-dot: #b0b0b0;
    --message-bot-bg: #333333;
    --message-user-bg: #03dac6;
    --message-bot-text: #e0e0e0;
    --message-user-text: #000000;
    --rgb-primary: 3, 218, 198;
    --aqua-color: #00ffff;
}

body.light-theme {
    --bg-color: #f4f7fc;
    --nav-bg-color: #ffffff;
    --card-bg-color: #ffffff;
    --text-color: #333333;
    --heading-color: #1a1a2e;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --icon-color: #555555;
    --icon-hover-color: #0056b3;
    --link-hover-color: #0056b3;
    --border-color: #d1d9e6;
    --input-bg: #f0f0f0;
    --input-text: #333333;
    --button-bg: #007bff;
    --button-text: #ffffff;
    --button-hover-bg: #0056b3;
    --scroll-track: #e9ecef;
    --scroll-thumb: #ced4da;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --typing-dot: #555555;
    --message-bot-bg: #e9ecef;
    --message-user-bg: #007bff;
    --message-bot-text: #333;
    --message-user-text: #ffffff;
    --rgb-primary: 0, 123, 255;
    --aqua-color: #007bff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 135px;
    position: relative;
}

body:not(.light-theme) { --rgb-primary: 3, 218, 198; }
body.light-theme { --rgb-primary: 0, 123, 255; }

h1,
h2,
h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

h1 { font-size: 2.8rem; line-height: 1.2; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.4rem; }
p { margin-bottom: 1rem; color: var(--text-color); transition: color 0.3s ease; }
a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--link-hover-color); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; }

.theme-toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    color: var(--icon-color);
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color);
}
.theme-toggle-btn:hover {
    color: var(--icon-hover-color);
    transform: scale(1.1);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.music-player-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background-color: var(--card-bg-color);
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 1001;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    max-width: 500px;
}
.music-player-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.3s ease;
    border-radius: 50%;
    flex-shrink: 0;
}
.music-player-icon:hover { transform: scale(1.1); }

.song-title-marquee-container {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}
#song-title-marquee {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-title 15s linear infinite;
}
#song-title-marquee:hover { animation-play-state: paused; }

@keyframes marquee-title {
    0% { transform: translateX(0); }
    100% { transform: translateX(-200%); }
}

.player-buttons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.player-buttons button {
    background: none;
    border: none;
    color: var(--icon-color);
    font-size: 1.1rem;
    margin: 0 4px;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
}
.player-buttons button:hover {
    color: var(--icon-hover-color);
    transform: scale(1.15);
}
.player-buttons button:disabled {
    color: var(--border-color);
    cursor: not-allowed;
    transform: none;
}


nav {
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg-color);
    padding: 0.8rem 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}
nav ul li { margin: 0 1.5rem; }
nav ul li a {
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease-out;
    transform: translateX(-50%);
}
nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}
nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}


main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.page {
    display: none;
    opacity: 0;
    animation: fadeOut 0.5s forwards;
    background-color: var(--card-bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.page:last-child { margin-bottom: 0; }

.page.active {
    display: block;
    animation: fadeIn 0.6s forwards ease-out;
}

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

#home .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}
@media (min-width: 768px) {
    #home .home-content {
        flex-direction: row;
        text-align: left;
        align-items: center;
    }
    #home .profile-pic {
        flex: 0 0 220px;
        margin-right: 2.5rem;
    }
    #home .profile-text { flex: 1; }
    #home h1 { text-align: left; }
    #home p { margin-left: 0; margin-right: 0; max-width: none; }
}
#home .profile-pic img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(var(--rgb-primary), 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#home .profile-pic img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 30px rgba(var(--rgb-primary), 0.7);
}
#home h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
    text-align: center;
}
#home p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
#whatsapp-button {
    background-color: var(--primary-color);
    color: var(--button-text);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}
#whatsapp-button:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
}

#projects .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
#projects .project-item {
    background-color: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex; /* Tambahkan flexbox */
    text-align: center; 
    flex-direction: column; /* Susun elemen secara vertikal */
}
#projects .project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px var(--shadow-color);
}
#projects .project-item img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Rasio 1:1 */
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-color);
    text-align: center; 
    flex-shrink: 0; /* Cegah gambar menyusut */
}
#projects .project-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    flex-shrink: 0; /* Cegah judul menyusut */
}

/* === Gaya Baru untuk Daftar Harga & Catatan === */
#projects .project-item .price-list {
    margin-top: auto; /* Dorong ke bawah agar sejajar jika item lain lebih tinggi */
    padding-top: 1rem; /* Beri jarak dari elemen di atasnya */
    border-top: 1px solid var(--border-color); /* Garis pemisah tipis */
    text-align: center; /* Rata kiri konten harga */
    flex-grow: 1; /* Biarkan price-list mengisi sisa ruang */
    display: flex; /* Gunakan flexbox di dalam price-list */
    flex-direction: column; /* Susun h4, ul, p secara vertikal */
}

#projects .project-item .price-list h4 {
    font-size: 1.1rem; /* Ukuran sub-judul list */
    color: var(--heading-color); /* Warna sub-judul */
    margin-bottom: 0.6rem; /* Jarak bawah */
    padding-bottom: 0.3rem;
    text-align: center; 
    border-bottom: 1px dashed var(--border-color); /* Garis bawah putus-putus */
    flex-shrink: 0;
}

#projects .project-item .price-list ul {
    list-style: none; /* Hilangkan bullet points */
    padding: 0;
    margin: 0 0 0.8rem 0; /* Margin bawah */
    text-align: center; 
    flex-grow: 1; /* Biarkan list mengisi ruang jika catatan tidak ada/pendek */
}

#projects .project-item .price-list li {
    padding: 4px 0; /* Jarak vertikal antar item */
    font-size: 0.95em; /* Ukuran font item list */
    color: var(--text-color); /* Warna teks list */
    text-align: center; 
}

#projects .project-item p.notes {
    font-size: 0.85em; /* Ukuran font lebih kecil */
    color: var(--icon-color); /* Warna abu-abu untuk catatan */
    line-height: 1.5; /* Jarak antar baris */
    margin-top: 0.8rem; /* Jarak dari list harga */
    padding-top: 0.8rem; /* Padding atas di dalam notes */
    text-align: center; 
    border-top: 1px dashed var(--border-color); /* Garis putus-putus pemisah */
    margin-bottom: 0; /* Hapus margin bawah default paragraf */
    flex-shrink: 0; /* Cegah notes menyusut */
}
/* === Akhir Gaya Baru === */


.skills-marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
    padding: 2rem 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}
.skills-marquee-container::before,
.skills-marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}
.skills-marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}
.skills-marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}
.skills-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
    will-change: transform;
}
.skills-track:hover { animation-play-state: paused; }

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 3rem;
    text-align: center;
    min-width: 90px;
}
.skill-item img {
    height: 55px;
    width: 55px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}
.skill-item:hover img { transform: scale(1.15); }
.skill-item p {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

#chat-ai {
    position: relative;
    overflow: hidden;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
    margin-bottom: 0;
    height: calc(100vh - 135px - 2.5rem);
    display: flex;
    flex-direction: column;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background-color: var(--bg-color);
}

#chat-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 95%;
    height: 100%;
    margin: 0 auto;
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 6px 25px var(--shadow-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

#chat-container h2 {
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    color: var(--heading-color);
    flex-shrink: 0;
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

#chat-messages::-webkit-scrollbar { width: 8px; }
#chat-messages::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 10px;
}
#chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb);
    border-radius: 10px;
    border: 2px solid var(--scroll-track);
}
#chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.message-wrapper {
    display: flex;
    margin-bottom: 0.2rem;
}

.message {
    padding: 0.7rem 1.1rem;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.4;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.user-message {
    background-color: var(--message-user-bg);
    color: var(--message-user-text);
    border-bottom-right-radius: 5px;
    margin-left: auto;
    margin-right: 5px;
}
.user-message img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 8px;
    display: block;
    background-color: rgba(0,0,0,0.1);
}

.bot-message {
    background-color: var(--message-bot-bg);
    color: var(--message-bot-text);
    border-bottom-left-radius: 5px;
    margin-right: auto;
    margin-left: 5px;
}
.bot-message img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    display: block;
}

#typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    margin-left: 15px;
    align-self: flex-start;
    height: 20px;
    flex-shrink: 0;
}
#typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: var(--typing-dot);
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}
#typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
#typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
#typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.chat-input-area {
    display: flex;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

#chat-input {
    flex-grow: 1;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    min-height: 48px;
    resize: none;
}
#chat-input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-color);
    box-shadow: 0 0 0 2px rgba(var(--rgb-primary), 0.3);
}

.chat-input-area button#send-button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.chat-input-area button#send-button:hover {
    background-color: var(--button-hover-bg);
    transform: scale(1.1) rotate(10deg);
}
.chat-input-area button#send-button:disabled {
     background-color: var(--border-color);
     cursor: not-allowed;
     transform: none;
}

.chat-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0 5px;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

#upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: var(--text-color);
}
#upload-button i {
    color: var(--aqua-color);
    font-size: 1.1em;
    transition: color 0.3s ease;
}
#upload-button:hover {
    background-color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-color: var(--icon-color);
}
#upload-button.has-file {
    border-color: var(--primary-color);
}
#upload-button.has-file i {
     color: var(--primary-color);
}

.chat-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

#reset-chat-button,
#whatsapp-button-chat {
    background-color: transparent;
    color: var(--icon-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
}
#reset-chat-button i,
#whatsapp-button-chat i {
    margin-right: 6px;
}
#reset-chat-button:hover,
#whatsapp-button-chat:hover {
    background-color: var(--message-bot-bg);
    color: var(--icon-hover-color);
    border-color: var(--message-bot-bg);
}

#image-preview-container {
    margin-top: 10px;
    max-width: 180px;
    min-height: 30px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: var(--input-bg);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#image-preview-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 5px;
}

#image-preview-container.has-preview {
    display: flex;
    border-style: solid;
}

#image-preview-container button {
    background: var(--message-bot-bg);
    color: var(--icon-color);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 3px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
#image-preview-container button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-text);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
#overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s linear 0s;
}

#music-player-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--shadow-color);
    z-index: 1003;
    width: 90%;
    max-width: 350px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s, transform 0.4s ease;
}
#music-player-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.4s ease, visibility 0s linear 0s, transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#close-button {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--icon-color);
    transition: color 0.3s ease, transform 0.3s ease;
}
#close-button:hover {
    color: var(--icon-hover-color);
    transform: rotate(90deg) scale(1.1);
}

.popup-content #album-art-display {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    margin: 0 auto 1.2rem auto;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    object-fit: cover;
    background-color: var(--input-bg);
}
.popup-content #song-title-display {
    font-size: 1.4rem;
    color: var(--heading-color);
    margin-bottom: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--input-bg);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 6px;
    transition: width 0.1s linear;
}

#loading-screen img {
    animation: spin 1.5s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


@media (max-width: 768px) {
    body { padding-top: 150px; }
    nav { top: 75px; padding: 0.5rem 0; }
    nav ul { justify-content: space-around; }
    nav ul li { margin: 0 0.5rem; }
    nav ul li a { font-size: 0.9rem; }
    h1 { font-size: 2.2rem; }
    #home h1 { font-size: 2.8rem; text-align: center; }
    h2 { font-size: 1.8rem; }
    .page { padding: 1.5rem; margin-bottom: 1.5rem; }
    main { padding: 1rem; }

    .music-player-controls {
        top: 15px;
        right: 15px;
        left: 70px;
        width: auto;
        max-width: calc(100% - 90px);
        padding: 6px 10px;
    }
    .music-player-icon { width: 25px; height: 25px; margin-right: 8px; }
    .song-title-marquee-container { font-size: 0.8rem; margin: 0 8px; }
    .player-buttons button { width: 28px; height: 28px; font-size: 1rem; margin: 0 3px; }

    nav { top: 65px; }

    #chat-ai { height: calc(100vh - 150px - 1.5rem); }

    #chat-container {
        max-width: 100%;
        height: 100%;
        margin: 0;
        padding: 1rem;
        border-radius: 0;
    }
    #chat-container h2 { font-size: 1.4rem; }
     .message { max-width: 85%; }
    .chat-input-area { gap: 0.5rem; }
    #chat-input { padding: 0.8rem 1rem; min-height: 42px; }
    .chat-input-area button#send-button { width: 42px; height: 42px; font-size: 1.2rem; }
     .chat-controls { margin-top: 0.5rem; padding: 0; }
    #reset-chat-button, #whatsapp-button-chat { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
     #upload-button { padding: 8px 12px; font-size: 0.85rem; }
     #image-preview-container { margin-left: 0; }

    /* Responsive adjustments for price list */
    #projects .project-item .price-list h4 { font-size: 1rem; }
    #projects .project-item .price-list li { font-size: 0.9em; }
    #projects .project-item p.notes { font-size: 0.8em; }

}

@media (max-width: 480px) {
    body { padding-top: 130px; }
    nav { top: 65px; }
    nav ul li { margin: 0 0.3rem; }
    nav ul li a { font-size: 0.8rem; padding: 0.4rem 0; }
    .theme-toggle-btn { top: 15px; left: 15px; width: 40px; height: 40px; font-size: 1rem; }

    .music-player-controls { left: 60px; max-width: calc(100% - 75px); padding: 5px 8px; }
    .song-title-marquee-container { display: none; }
    .player-buttons { gap: 5px; margin-left: auto; }
    .player-buttons button { font-size: 0.9rem; margin: 0; width: 26px; height: 26px; }

    #home .profile-pic img { width: 150px; height: 150px; }
    #home h1 { font-size: 2.5rem; }
    #home p { font-size: 1rem; }
    #projects .project-grid { grid-template-columns: 1fr; gap: 1.5rem; } /* Adjust gap for smaller screens */
    #projects .project-item { padding: 1rem; } /* Adjust padding */
    #chat-ai { height: calc(100vh - 130px - 1rem); }
     #chat-container { padding: 0.8rem; }
     .chat-input-area button#send-button { width: 40px; height: 40px; font-size: 1.1rem; }
    #chat-input { padding: 0.7rem 0.8rem; font-size: 0.9rem; min-height: 40px; }
    #upload-button { padding: 7px 10px; font-size: 0.8rem; }
    #upload-button i { font-size: 1em; }
     #image-preview-container { max-width: 120px; }
     .message { max-width: 90%; }

    /* Further responsive adjustments for price list */
     #projects .project-item .price-list h4 { margin-bottom: 0.5rem; }
     #projects .project-item .price-list ul { margin-bottom: 0.6rem; }
     #projects .project-item .price-list li { padding: 3px 0; }
     #projects .project-item p.notes { margin-top: 0.6rem; padding-top: 0.6rem; font-size: 0.75em; }
}
