:root {
   --primary-color: #1ED760;
   --background-color: #121212;
   --text-color: #FFFFFF;
   --input-background: #2A2A2A;
   --font-family: 'Montserrat', sans-serif;
}

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

body {
   background-color: var(--background-color);
   color: var(--text-color);
   font-family: var(--font-family);
   min-height: 100vh;
   display: flex;
   flex-direction: column;
}

.container {
   max-width: 800px;
   margin: 0 auto;
   padding: 2rem 1rem;
}

.header {
   text-align: center;
   margin-bottom: 2.5rem;
}

.title {
   font-size: 2.5rem;
   margin-bottom: 0.5rem;
   color: var(--primary-color);
}

.subtitle {
   font-size: 1.1rem;
   color: #888;
}

.main-content {
   background: #181818;
   padding: 2rem;
   border-radius: 12px;
   box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.input-group {
   display: flex;
   gap: 1rem;
   margin-bottom: 2rem;
}

.input-field {
   flex: 1;
   padding: 1rem;
   border: none;
   border-radius: 8px;
   background: var(--input-background);
   color: var(--text-color);
   font-size: 1rem;
   transition: all 0.3s ease;
}

.input-field:focus {
   outline: none;
   box-shadow: 0 0 0 2px var(--primary-color);
}

.generate-button {
   padding: 1rem 2rem;
   background: var(--primary-color);
   border: none;
   border-radius: 8px;
   color: white;
   font-weight: 600;
   cursor: pointer;
   transition: transform 0.2s ease, 0.3s ease;
}

.logout-button {
   padding: 1rem 2rem;
   width: 100%;
   background: #D6241E;
   border: none;
   border-radius: 8px;
   color: white;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.3s ease;
   margin: 2rem 0px;
}

.logout-button:hover {
   background-color: #961410;
   transform: scale(1.02);
}

#welcome_text {
   margin: -1.5rem 0rem 1.5rem 0rem;
   color: white;
   font-weight: 600;
}

.generate-button:hover {
   background: #1ED760;
   transform: scale(1.02);
}

.generate-button:active {
   transform: scale(0.98);
}

.loading {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 1rem;
   margin: 2rem 0;
   opacity: 0;
   transition: opacity 0.3s ease;
}

.loading.hidden {
   display: none;
}

.spinner {
   width: 24px;
   height: 24px;
   border: 3px solid rgba(255,255,255,0.3);
   border-radius: 50%;
   border-top-color: var(--primary-color);
   animation: spin 1s ease-in-out infinite;
}

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

.result-container {
   opacity: 0;
   transform: translateY(20px);
   transition: all 0.4s ease;
}

.result-container.visible {
   opacity: 1;
   transform: translateY(0);
}

.success-message {
   text-align: center;
   margin-bottom: 1.5rem;
   color: var(--primary-color);
   font-weight: 600;
}

.spotify-embed {
   width: 100%;
   max-width: 600px;
   margin: 0 auto;
}

.spotify-embed iframe {
   width: 100%;
   height: 380px;
   border-radius: 12px;
   border: none;
}

.error-message {
   color: #ff4444;
   padding: 1rem;
   text-align: center;
   display: none;
}

.error-message.visible {
   display: block;
}

@media (max-width: 768px) {
   .input-group {
       flex-direction: column;
   }
   
   .generate-button {
       width: 100%;
   }
   
   .container {
       padding: 1rem;
   }
   
   .main-content {
       padding: 1.5rem;
   }
}

.title .sparkle {
   margin-left: 8px;
   font-size: 1.2em;
   animation: sparkle 2s infinite;
   user-select: none;
}

.subtitle {
   font-size: 1.1rem;
   color: #888;
   margin-top: 0.5rem;
   display: flex;
   align-items: center;
   gap: 6px;
}

.subtitle::before {
   font-size: 0.9em;
}

.input-group {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   margin-bottom: 2rem;
}

.input-field {
   width: 100%;
   margin-bottom: 1rem;
}

.generate-button {
   width: 100%;
   position: relative;
   padding-left: 2.5rem;
}

.sparkle-button {
   position: absolute;
   left: 1rem;
   top: 50%;
   transform: translateY(-50%);
   font-size: 1.2rem;
}

@keyframes sparkle {
   0% { opacity: 1; }
   50% { opacity: 0.5; transform: scale(1.1); }
   100% { opacity: 1; }
}

.container {
   max-width: 600px;
}

/* footer */
.footer {
   margin-top: auto;
   padding: 2rem 1rem;
   color: #888;
   font-size: 0.9rem;
   border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
   max-width: 600px;
   margin: 0 auto;
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.5rem;
   text-align: center;
}

.footer-links {
   display: flex;
   gap: 1.5rem;
}

.footer-links a {
   color: #888;
   text-decoration: none;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.3s ease;
}

.footer-links a:hover {
   color: var(--primary-color);
   transform: translateY(-1px);
}

.footer-links a {
   color: #888;
   text-decoration: none;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   transition: all 0.3s ease;
}

.portfolio-link {
   color: #888;
   text-decoration: underline;
   gap: 0.5rem;
   transition: all 0.3s ease;
}

.portfolio-link:hover {
   color: var(--primary-color);
   transform: translateY(-1px);
}

@media (max-width: 480px) {
   .footer {
       padding: 1.5rem 1rem;
       font-size: 0.8rem;
   }
   
   .footer-links {
       flex-direction: column;
       gap: 0.8rem;
   }
}

.footer-links img {
   width: 18px;
   height: 18px;
   filter: 
       brightness(0) saturate(100%) 
       invert(70%) sepia(64%) 
       saturate(5008%) hue-rotate(100deg) 
       brightness(112%) contrast(101%);
   transition: filter 0.3s ease;
}

.footer-links a:hover img {
   filter: 
       brightness(0) saturate(100%) 
       invert(70%) sepia(64%) 
       saturate(6008%) hue-rotate(100deg) 
       brightness(112%) contrast(101%);filter: 
       brightness(0) saturate(100%) 
       invert(70%) sepia(64%) 
       saturate(10008%) hue-rotate(100deg) 
       brightness(112%) contrast(101%);
}

.auth-section {
   text-align: center;
   margin: 2rem 0;
}

.login-button {
   padding: 1rem 1.5rem;
   background: var(--primary-color);
   border: none;
   border-radius: 8px;
   color: white;
   font-weight: 600;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   gap: 0.8rem;
   transition: all 0.3s ease;
   display: block;
   margin: 2rem 0px;
}

.login-button:hover {
   background: #1ED760;
   transform: scale(1.02);
}

.login-button img {
   width: 24px;
   height: 24px;
}

.loading-message {
   color: var(--primary-color);
   font-size: 1.2rem;
   margin: 2rem 0;
   text-align: center;
}

.error-message {
   color: #ff4444;
   padding: 1rem;
   text-align: center;
}

/* loading */

.loading-container {
   display: none;
   flex-direction: column;
   align-items: center;
   gap: 1rem;
   margin-top: 1rem;
   text-align: center;
   max-width: 200px;
}

.loader-spinner {
   width: 50px;
   height: 50px;
   border: 5px solid #f3f3f3;
   border-top: 5px solid #1ED760;
   border-radius: 50%;
   animation: spin 1s linear infinite;
}

.loading-messages {
   color: #1ED760;
   font-weight: 600;
   min-height: 24px;
}

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

.credits_box {
   background-color: #2A2A2A;
   display: none;
   border-radius: 100%;
}

.credits_text {
   display: none;
}