@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

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

:root {
    --shadow-grey: #161925ff;
    --twilight-indigo: #23395bff;
    --rich-cerulean: #406e8eff;
    --powder-blue: #8ea8c3ff;
    --frozen-water: #cbf7edff;
}

html {
    scroll-behavior: smooth;
}

.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--shadow-grey);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader {
    border: 8px solid transparent;
    border-top: 8px solid var(--frozen-water);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    position: relative;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

.loader::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: radial-gradient(circle, var(--frozen-water) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glowPulse {
    0% { 
        opacity: 0.6;
        transform: scale(1);
    }
    100% { 
        opacity: 1;
        transform: scale(1.1);
    }
}

.loader-container p {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 30px;
    text-align: center;
    color: var(--frozen-water);
    font-weight: bolder;
    font-size: x-large;
}


main {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

main.loaded {
    opacity: 1;
}


body {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--shadow-grey) 0%, var(--twilight-indigo) 100%);
    padding-top: 80px;
    position: relative;
    overflow-x: hidden;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--frozen-water);
    border-radius: 50%;
    box-shadow: 0 0 16px var(--frozen-water);
    animation: fall linear infinite;
    filter: brightness(1.3);
}

@keyframes fall {
    0% { 
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 0.8; transform: scale(1); }
    90% { opacity: 0.7; }
    100% { 
        transform: translateY(100vh) scale(1.4);
        opacity: 0;
    }
}

.star:nth-child(1) { left: 5%; animation-duration: 6s; animation-delay: 3s; }
.star:nth-child(2) { left: 10%; animation-duration: 7s; animation-delay: 1s; }
.star:nth-child(3) { left: 15%; animation-duration: 5s; animation-delay: 2s; }
.star:nth-child(4) { left: 20%; animation-duration: 5.5s; animation-delay: 1s; }
.star:nth-child(5) { left: 25%; animation-duration: 7s; animation-delay: 3s; }
.star:nth-child(6) { left: 30%; animation-duration: 6s; animation-delay: 4s; }
.star:nth-child(7) { left: 35%; animation-duration: 5s; animation-delay: 1s; }
.star:nth-child(8) { left: 40%; animation-duration: 7s; animation-delay: 2s; }
.star:nth-child(9) { left: 45%; animation-duration: 6s; animation-delay: 1s; }
.star:nth-child(10) { left: 50%; animation-duration: 5s; animation-delay: 1s; }
.star:nth-child(11) { left: 55%; animation-duration: 6s; animation-delay: 2s; }
.star:nth-child(12) { left: 60%; animation-duration: 5s; animation-delay: 1s; }
.star:nth-child(13) { left: 65%; animation-duration: 7s; animation-delay: 3s; }
.star:nth-child(14) { left: 70%; animation-duration: 6s; animation-delay: 4s; }
.star:nth-child(15) { left: 75%; animation-duration: 5s; animation-delay: 1s; }
.star:nth-child(16) { left: 80%; animation-duration: 5s; animation-delay: 2s; }
.star:nth-child(17) { left: 85%; animation-duration: 7s; animation-delay: 2s; }
.star:nth-child(18) { left: 90%; animation-duration: 6s; animation-delay: 2s; }
.star:nth-child(19) { left: 95%; animation-duration: 5s; animation-delay: 2s; }
.star:nth-child(20) { left: 100%; animation-duration: 7s; animation-delay: 2s; }

.navbar {
    background: var(--twilight-indigo);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rich-cerulean);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(61, 104, 135, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease; 
    transform: translateY(0); 
}

.navbar.hidden {
    transform: translateY(-100%);  
}

.buttons {
    display: flex;
    align-items: center;
    gap: 50px;
}

.poetry-nav-btn, .music-nav-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    background-color: var(--powder-blue);
    border: 2px solid var(--powder-blue);
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
    border-radius: 50%;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--shadow-grey);
    box-shadow: 0 4px 12px rgba(135, 160, 186, 0.4);
    text-decoration: none;
    display: inline-block;
}

.poetry-nav-btn:hover, .music-nav-btn:hover {
    transform: translateY(-3px);
    background-color: var(--frozen-water);
    color: var(--twilight-indigo);
    border-color: var(--frozen-water);
    box-shadow: 0 8px 25px rgba(204, 249, 239, 0.5);
}

.poetry-nav-btn:active, .music-nav-btn:active {
    transform: translateY(-1px);
}

.headers {
    padding-top: 20px;
    text-align: center;
    margin-bottom: 2rem;
}

.h1 {
    font-size: 1.5rem;
    font-family: "Times New Roman", Times, serif;
    color: var(--frozen-water);
    margin: 1rem 0;

    font-weight: 300;
}

.h2 {
    font-family: "Great Vibes", cursive;
    font-size: 5rem;
    color: var(--frozen-water);
    margin-bottom: 2rem;
    font-weight: lighter;
    letter-spacing: 35px;
    text-shadow: 2px 2px 10px rgba(200, 248, 237, 0.3);
}

.home {
    padding: 1rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-me {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--twilight-indigo);
    width: 80%;
    max-width: 700px;
    min-height: 200px;
    margin: 0 auto 2rem;
    padding: 2.5rem;
    background: var(--frozen-water);
    border-radius: 12px;
    box-shadow: 
        8px 8px 0px var(--rich-cerulean),
        16px 16px 0px rgba(55, 97, 128, 0.2),
        inset 0px 2px 4px rgba(250, 248, 248, 0.6);
    transform: rotate(-1deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-me:hover {
    transform: rotate(3deg);
    box-shadow: 
        8px 8px 0px var(--powder-blue),
        20px 20px 20px rgba(58, 104, 137, 0.3),
        inset 0px 2px 6px rgba(241, 238, 238, 0.8);
}

.playlist-page {
    min-height: 100vh;
    background: transparent;
    padding: 4rem 2rem 2rem 2rem;  
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   
    align-items: center;
    color: var(--frozen-water);
}

.playlist-page h3 {
    font-family: "Great Vibes", cursive;
    font-weight: lighter;
    letter-spacing: 35px;
    text-align: center;
    font-size: 4rem;
    margin-bottom: 2rem;
    margin-top: 0;
    color: var(--frozen-water);
    text-shadow: 0 0 20px rgba(191, 239, 228, 0.5);
}


.playlists {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}


.playlist {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 15px 40px rgba(18, 21, 31, 0.4),
        inset 0 1px 0 rgba(195, 238, 228, 0.3);
    transition: transform 0.3s ease;
}


.playlist:hover {
    transform: translateY(-8px);
}

.playlist h4 {
    font-family: "Great Vibes", cursive;
    font-weight: lighter;
    text-align: center;
    margin-bottom:2px;
    font-size: 30px;
    letter-spacing: 5px;
}

.playlist p {
    text-align: center;
    font-family: "Raleway", sans-serif;
    font-weight: lighter;
    font-style: italic;
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 15px;
}

.poetry-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Georgia', serif;
    padding-bottom: 150px;
}

.poetry-page h3 {
    font-family: "Great Vibes", cursive;
    font-weight: lighter;
    letter-spacing: 35px;
    text-align: center;
    font-size: 4rem;
    margin-bottom: 2rem;
    margin-top: 0;
    color: var(--frozen-water);
    text-shadow: 0 0 20px rgba(189, 241, 229, 0.5);
}

.poems {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.poem-container {
    perspective: 1000px;
}

.p-card {
    width: 380px;
    height: 480px;
}

.p-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: #2b3e52;
}

.poem-container:hover .p-card-inner {
    transform: rotateY(180deg);
}

.p-card-front, .p-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

.p-card-front {
    background: var(--frozen-water);
    color: white;
    text-align: center;
}

.p-card-inner h5 {
    font-family: "Great Vibes", cursive;
    font-weight: normal;
    text-align: center;
    margin-bottom:2px;
    font-size: 30px;
    letter-spacing: 5px;
    color: var(--shadow-grey);
}

.p-card-back {
    background: var(--powder-blue);
    color: var(--shadow-grey);
    transform: rotateY(180deg);
    font-size: 1rem;
    line-height: 1.7;
}

.p-card-back p {
    text-align: center;
    font-family: "Raleway", sans-serif;
    font-weight:normal;
    font-style: italic;
    margin-left: 5px;
    margin-right: 5px;
    margin-bottom: 2px;
    color: var(--shadow-grey);
    max-height: 100%;  
    overflow-y: auto;  
    padding-right: 10px;  
}

.p-card-back br {
    line-height: 1.4;
}


.p-card-back p::-webkit-scrollbar {
    width: 15px;
}

.p-card-back p::-webkit-scrollbar-track {
    background: transparent;
}

.p-card-back p::-webkit-scrollbar-thumb {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 2px;
}

.bottom-bar{
    margin-top: 10rem;
    background: var(--twilight-indigo);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rich-cerulean);
    padding: 2rem 2rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(63, 112, 146, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease; 
    transform: translateY(0); 
}

.buttons {
    display: flex;
    align-items: center;
    gap: 50px;
}

.instagram, .email{
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    background-color: var(--powder-blue);
    border: 2px solid var(--powder-blue);
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
    border-radius: 40%;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--shadow-grey);
    box-shadow: 0 4px 12px rgba(142, 168, 195, 0.4);
    text-decoration: none;
    display: inline-block;
}

.instagram:hover, .email:hover {
    transform: translateY(-3px);
    background-color: var(--frozen-water);
    color: var(--twilight-indigo);
    border-color: var(--frozen-water);
    box-shadow: 0 8px 25px rgba(192, 240, 228, 0.5);
}

.instagram:active, .email:active {
    transform: translateY(-1px);
}