/* Add this HTML block right before the body block */
html {
    min-height: -webkit-fill-available;
}

@media (max-width: 768px) { /* tablets & phones */
  /* smaller font sizes, stacked layout */
}

@media (min-width: 769px) { /* desktop */
  /* normal layout */
}

body {
    font-family: 'Ubuntu', sans-serif;
    /* Increased padding 20px -> 23px (Internal size) */
    padding: 30px 0;
    text-align: center;
    color: #fff; 
    
    background: linear-gradient(to bottom, #070707, #090909, #111111, #333333); 
    
    box-sizing: border-box; 
    
    min-height: 100vh;
    min-height: -webkit-fill-available;

    overflow-x: hidden; 
    margin: 0;
}

header {
    /* RESTORED MARGINS */
    margin-bottom: 10px;
    margin-top: 20px; 
}

.profile-picture-container {
    position: relative;
    display: inline-block;
    /* Increased size */
    width: 130px;
    height: 130px;
}

.profile-picture {
    /* Increased size */
    width: 126px;
    height: 126px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
    
    user-select: none;          
    -webkit-user-drag: none;    
    -webkit-touch-callout: none; 
}


.avatar-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* Increased size */
    width: 152px !important; 
    height: 152px !important;
    
    pointer-events: none;
    z-index: 10;
}

/* Ensure the container is set up correctly */
.profile-picture-container {
    position: relative; 
    display: inline-block;
    /* Increased size */
    width: 128px;
    height: 128px;
    /* RESTORED MARGIN */
    margin-bottom: 10px;
}


h1, p {
    /* RESTORED MARGIN */
    margin: 7px 0;
    -webkit-touch-callout: none; 
    -webkit-tap-highlight-color: transparent;
}

h1 {
  font-family: "Aref Ruqaa", serif;
  font-weight: 400;
  /* Increased font size */
  font-size: 42px;
  /* RESTORED MARGIN */
  margin-top: -20px;
  margin: 7px 0;
  background: linear-gradient(120deg, yellow, orange, red, orange, yellow);
  background-size: 400% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: waveGlow 5s linear infinite;
}

@keyframes waveGlow {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 100% center;
  }
}


p.spidey-text {
    color: #777;
    display: flex;
    font-weight: bold;
    justify-content: center;
    font-family: 'Amiri', serif;
    margin: 0; 
}


p.yousuf {
  font-family: "Reem Kufi", sans-serif;
  font-weight: bold;
  font-size: 20px;
  margin-top: -15px;
  background: linear-gradient(120deg, yellow, orange, red, orange, yellow);
  background-size: 400% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: waveGlow 5s linear infinite;
}


p {
    color: #777; 
    display: flex;
    justify-content: center;
    font-family: 'Noto Sans', sans-serif; 
}

.social-icons a {
    color: #fff; /* Icon color */
    margin: 0 3px; /* Space between icons */
    font-size: 23px; /* Icon size */
    text-decoration: none; /* Remove underline */
    display: inline-flex; /* Use flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    width: 41px; /* Circle width */
    height: 41px; /* Circle height */
    border-radius: 50%; /* Make circle */
    background-color: rgba(255, 255, 255, 0.2); /* Background color */
    margin-bottom: 25px; /* Space below icons */
}



.social-icons a {
    transition: transform 0.2s ease; 
}

.social-icons a:active {
    transform: scale(0.9); 
}


.social-icons a.clicked {
    transform: scale(0.9); 
    transition: transform 0.2s ease; 
}


footer {
    /* RESTORED MARGIN */
    margin-top: 20px;
    color: #777; 
    display: flex;
    justify-content: center;
    font-family: 'Noto Sans', sans-serif;
    user-select: none;
}

/* --------- */

/* --- SPOTIFY CARD (FIXED LAYOUT) --- */
.spotify-card {
    background-color: rgba(20, 20, 20, 0.9);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    width: 278px;
    margin: 10px auto;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    
    /* Stack items vertically: Header -> Row -> Progress */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between elements */

    /* Protection */
    user-select: none;
    -webkit-user-select: none;
}

/* header styling */
.spotify-header {
    font-size: 12px;
    color: #1DB954;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* The container for Image + Text Side-by-Side */
.spotify-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100%;
}

/* The Image Styling */
#spotify-album-art {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0; /* Prevents squishing */
    pointer-events: none; /* Cannot click/drag */
}

/* The Text Info */
.spotify-info {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.song-title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block !important;
    text-align: left !important;
}

.artist-name {
    font-size: 12px;
    color: #b3b3b3 !important;
    margin: 2px 0 0 0;
    display: block !important;
    text-align: left !important;
}

/* Progress Bar Styling */
.spotify-progress-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.spotify-progress-bar {
    width: 100%;
    height: 4px;
    background-color: #404040;
    border-radius: 2px;
    position: relative;
}

#spotify-progress-fill {
    height: 100%;
    background-color: #fff; /* White bar like Spotify */
    border-radius: 2px;
    width: 0%;
    transition: width 1s linear;
}

.spotify-time {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #b3b3b3;
    margin-top: 5px;
    font-family: monospace; /* Keeps numbers aligned */
}


/* --- RAIN EFFECT --- */

#rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Changed from 100vw to 100% */
    height: 100%; /* Changed from 100vh to 100% */
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}


/* Individual drop style */
.raindrop {
    position: absolute;
    top: -50px; /* Start above screen */
    color: #ffffff;
    font-family: 'Ubuntu', monospace; /* Monospace looks more digital */
    font-weight: bold;
    user-select: none;
    will-change: transform, opacity; /* Performance optimization */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation-name: fall;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

/* The falling animation */
@keyframes fall {
    to {
        top: 110vh; /* End below screen */
        transform: translateY(20px) rotate(10deg); /* Slight wobble */
    }
}
