body {
    font-family: 'Arial', sans-serif;
    background-image: url('./hero.png'); 
    background-size: cover;
    background-position: center;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
}

.settings-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
}

.pomodoro {
    width: 90%;
    max-width: 600px; 
    text-align: center;
    position: relative;
    z-index: 2;
}

.timer {
    font-size: 280px;
    font-weight: 700;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.timer:hover {
    transform: scale(1.05);
}

.controls button {
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    color: #3130306e;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    font-size: 16px;
}

.controls button:hover {
    background-color: #bbc4be;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.playlist-settings {
    text-align: right; /* Align text to the right */
    margin: 20px 20px; /* Add margin to the top and sides */
    position: absolute; /* Position it absolutely */
    top: 100px; /* Adjust the top position as needed */
    right: 20px; /* Align to the right */
    z-index: 10; /* Ensure it appears above other elements */
}

.playlist-settings input {
    padding: 10px;
    width: 70%;
    max-width: 200px; /* Adjust width for better fit */
    border-radius: 5px;
    border: 1px solid #ccc;
}

.playlist-settings button {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

.playlist-settings button:hover {
    background-color: #45a049;
}

/* Responsive modal and blur effect */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px); /* Blur the background */
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(255,255,255,0.95);
    margin: auto;
    padding: 2em 1.5em;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    position: relative;
    color: #000;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.close {
    position: absolute;
    top: 1em; right: 1em;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}
.close:hover { color: #333; }

/* Spotify FAB Icon */
.spotify-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #1db954;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: spotifyFabIn 0.5s;
}
.spotify-fab img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}
.spotify-fab:active {
    transform: scale(0.95);
}
@keyframes spotifyFabIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Vibration animation for dancing effect */
@keyframes vibrate {
    0% { transform: translate(0, 0) rotate(-5deg);}
    20% { transform: translate(-2px, 2px) rotate(5deg);}
    40% { transform: translate(-2px, -2px) rotate(-5deg);}
    60% { transform: translate(2px, 2px) rotate(5deg);}
    80% { transform: translate(2px, -2px) rotate(-5deg);}
    100% { transform: translate(0, 0) rotate(-5deg);}
}
.spotify-fab.vibrating {
    animation: vibrate 0.4s infinite;
}

.spotify-widget {
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    z-index: 2000; 
    text-align: center; 
    background-color: rgba(0, 0, 0, 0.7); 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    width: calc(100% - 40px); 
    max-width: 400px; 
    animation: spotifyWidgetIn 0.5s;
}
@keyframes spotifyWidgetIn {
    from { transform: translateY(100px) scale(0.8); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.spotify-widget.hide-anim {
    animation: spotifyWidgetOut 0.4s forwards;
}
@keyframes spotifyWidgetOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(100px) scale(0.8); opacity: 0; }
}

@media (max-width: 768px) {
    .pomodoro {
        width: 90%;
        max-width: 90%; 
    }

    .timer {
        font-size: 150px; 
    }

    .controls button {
        font-size: 14px; 
        padding: 10px 20px; 
    }

    .modal {
        width: 90%; 
        max-width: none; 
    }

    .spotify-widget {
        width: calc(100% - 40px); 
        max-width: none; 
    }
}

@media (max-width: 480px) {
    .timer {
        font-size: 100px; 
    }

    .controls button {
        font-size: 12px; 
        padding: 8px 16px; 
    }
}

@media (max-width: 600px) {
    .modal-content {
        width: 98vw;
        padding: 1em;
        max-width: 98vw;
        font-size: 1em;
    }
    .pomodoro, .spotify-widget {
        max-width: 98vw;
    }
    .playlist-settings-modal {
        padding: 0.5em;
    }
    .timer {
        font-size: 18vw;
    }
    .controls button {
        font-size: 1em;
        padding: 10px 16px;
    }
}
