:root {
    --primary-color-male: #3a506b;
    --secondary-color-male: #5bc0be;
    --accent-color-male: #6fffe9;
    --background-color-male: #e0e8f0;
    --text-color-male: #1d3557;

    --primary-color-female: #ff85a1;
    --secondary-color-female: #fbb1bd;
    --accent-color-female: #fde2e4;
    --background-color-female: #fff0f3;
    --text-color-female: #590d22;

    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--background-color-male), #c1d3e5);
    color: var(--text-color-male);
    transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
}

body.female {
    background: linear-gradient(135deg, var(--background-color-female), #ffd1dc);
    color: var(--text-color-female);
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrap {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 100%;
    max-width: 500px;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: var(--primary-color-male);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px var(--shadow-color);
    transition: color var(--transition-speed) ease;
}

body.female h1 {
    color: var(--primary-color-female);
}

.gender-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.gender-switch {
    display: none;
}

.gender-switch-label {
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: var(--secondary-color-male);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

body.female .gender-switch-label {
    background-color: var(--secondary-color-female);
}

.gender-switch-label i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: all var(--transition-speed) ease;
    color: rgba(255, 255, 255, 0.5);
}

.gender-switch-label .fa-mars {
    left: 8px;
}

.gender-switch-label .fa-venus {
    right: 8px;
}

.gender-switch-label .fa-mars,
body.female .gender-switch-label .fa-venus {
    color: white;
    opacity: 1;
}

body.female .gender-switch-label .fa-mars,
.gender-switch-label .fa-venus {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.5;
}

.gender-switch-label .slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform var(--transition-speed) ease;
}

.gender-switch:checked + .gender-switch-label .slider {
    transform: translateX(30px);
}

#quote-container {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.5s ease;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

#quote-text {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-color-male);
    transition: color var(--transition-speed) ease;
}

body.female #quote-text {
    color: var(--text-color-female);
}

#quote-author {
    font-style: italic;
    font-size: 1rem;
    color: var(--primary-color-male);
    align-self: flex-end;
    transition: color var(--transition-speed) ease;
}

body.female #quote-author {
    color: var(--primary-color-female);
}

.mood-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.mood-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    background-color: var(--secondary-color-male);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

body.female .mood-btn {
    background-color: var(--secondary-color-female);
    color: var(--text-color-female);
}

.mood-btn:hover, .mood-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
    background-color: var(--primary-color-male);
}

body.female .mood-btn:hover, body.female .mood-btn:focus {
    background-color: var(--primary-color-female);
}

.mood-btn.clicked {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

#youtube-url {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--secondary-color-male);
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

body.female #youtube-url {
    border-color: var(--secondary-color-female);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color-female);
}

body.female #youtube-url::placeholder {
    color: rgba(89, 13, 34, 0.5);
}

#youtube-url:focus {
    outline: none;
    border-color: var(--primary-color-male);
    box-shadow: 0 0 10px rgba(95, 192, 190, 0.2);
}

body.female #youtube-url:focus {
    border-color: var(--primary-color-female);
    box-shadow: 0 0 10px rgba(255, 133, 161, 0.2);
}

.audio-controls {
    display: flex;
    gap: 0.75rem;
}

.audio-btn {
    padding: 0.75rem;
    font-size: 1rem;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    background-color: var(--secondary-color-male);
    color: white;
}

body.female .audio-btn {
    background-color: var(--secondary-color-female);
    color: var(--text-color-female);
}

.audio-btn:hover, .audio-btn:focus {
    background-color: var(--primary-color-male);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

body.female .audio-btn:hover, body.female .audio-btn:focus {
    background-color: var(--primary-color-female);
}

.audio-btn.active {
    background-color: var(--accent-color-male);
    color: var(--text-color-male);
    box-shadow: 0 2px 5px var(--shadow-color);
    transform: translateY(2px);
}

body.female .audio-btn.active {
    background-color: var(--accent-color-female);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 0 5px 15px var(--shadow-color);
    transform: translateY(20px);
    font-size: 0.9rem;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.info {
    background-color: #3498db;
}

.notification.error {
    background-color: #e74c3c;
}

.footer {
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    color: var(--text-color-male);
    font-weight: 600;
}

body.female .footer p {
    color: var(--text-color-female);
}

.footer-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--primary-color-male);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

body.female .footer-link {
    color: var(--primary-color-female);
}

.footer-link:hover {
    color: var(--accent-color-male);
    text-decoration: underline;
}

body.female .footer-link:hover {
    color: var(--accent-color-female);
}

@media (min-width: 768px) {
    .container {
        padding: 2.5rem;
        max-width: 600px;
    }

    h1 {
        font-size: 3rem;
        margin-bottom: 2rem;
    }

    #quote-container {
        min-height: 200px;
        padding: 2rem;
    }

    #quote-text {
        font-size: 1.6rem;
    }

    #quote-author {
        font-size: 1.2rem;
    }

    .mood-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .mood-btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

    #youtube-url {
        padding: 1rem;
        font-size: 1rem;
    }

    .audio-btn {
        padding: 0.8rem;
    }

    .notification {
        padding: 15px 25px;
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer p {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 800px;
    }

    #quote-text {
        font-size: 1.8rem;
    }

    .mood-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}