:root {
    --bg-color: #1a1a1d;
    --card-color: rgba(255, 255, 255, 0.08);
    --primary-color: #9c27b0;
    --secondary-color: #ff6f61;
    --text-color: #f5f5f5;
    --shadow-color: rgba(0, 0, 0, 0.6);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 1rem;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
}

#app {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.card {
    background: var(--card-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    flex-grow: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.timer-card {
    flex-basis: 300px;
}

#timer-mode {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-btn {
    background: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 300;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 15px var(--primary-color);
}

#time {
    font-size: 6rem;
    font-weight: 700;
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#controls button {
    background: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#controls button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

#start {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 600;
}

#reset {
    background: transparent;
    border: 1px solid var(--text-color);
}
#reset svg {
    stroke: var(--text-color);
}

.music-card, .quote-card {
    flex-basis: 300px;
    align-self: stretch;
}

.music-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


h2 {
    font-weight: 600;
    margin-top: 0;
    color: var(--secondary-color);
}

#music-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#music-controls button {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#music-controls button:hover {
    background: var(--secondary-color);
    color: var(--text-color);
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--secondary-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary-color);
}

.quote-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#quote-text {
    font-size: 1.2rem;
    font-weight: 300;
    font-style: italic;
}

#quote-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1rem;
}

#share {
     background: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--primary-color);
}

#settings-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
#settings-btn svg {
    stroke: var(--text-color);
    width: 24px;
    height: 24px;
}

#settings-modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-color);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.setting label {
    font-size: 1rem;
}

.setting input {
    width: 80px;
    padding: 0.5rem;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    border-radius: 10px;
    text-align: center;
}

#save-settings {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--primary-color);
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
    }
    #app {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }
    .card {
        width: calc(100% - 2rem);
        max-width: 400px;
    }
    #time {
        font-size: 4rem;
    }
}