/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #ff1493; /* Deep pink for headers and buttons */
    --secondary-color: #ff69b4; /* Hot pink for gradients and accents */
    --accent-color: #40e0d0; /* Turquoise for gradients and success */
    --text-color: #fff; /* White for primary text */
    --contrast-text: #333; /* Dark gray for high-contrast text */
    --shadow-color: #ff1493; /* Deep pink for text shadows */
    --bg-transparent: rgba(255, 255, 255, 0.4); /* Semi-transparent white for backgrounds */
    --bg-input: rgba(255, 255, 255, 0.8); /* Semi-transparent white for inputs */
    --text-dark: #333; /* Dark text for inputs */
    --success-color: #40e0d0; /* Turquoise for success messages */
    --error-color: #ff0000; /* Red for error messages */
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: var(--secondary-color); /* Fallback */
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
header {
    text-align: center;
    padding: 2rem;
    background: var(--primary-color);
}

header h1 {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    font-size: 3rem;
    color: var(--text-color);
    text-shadow: 2px 2px var(--shadow-color);
}

header p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

/* Intro Section */
.intro {
    max-width: 1000px;
    margin: 2rem auto;
    text-align: center;
    font-size: 1.1rem;
}

.intro p {
    font-style: italic; /* Emphasize intro text (2025 design trend) */
}

/* Divider Styles */
.divider {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    font-size: 2rem;
    color: var(--text-color);
    text-align: center;
    text-shadow: 2px 2px var(--shadow-color);
    background: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 10px;
    margin: 2rem auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Full-width divider */
}

.divider:hover, .divider:focus {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--text-color);
}

/* Video Content */
.video-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(355px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto 4rem;
}

.video-item {
    background: var(--bg-transparent);
    padding: 2rem 1rem;
    border: 0.5rem solid var(--bg-transparent);
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
    contain: content; /* Optimize rendering performance */
}

.video-item iframe {
    width: 80%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 15px;
    transform: rotate(6deg); /* Increased for more crooked effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto 1rem;
    box-sizing: border-box;
}

.video-item--even iframe {
    transform: rotate(-6deg); /* Increased for more crooked effect */
}

.video-item iframe:hover, .video-item iframe:focus {
    transform: rotate(0deg);
    box-shadow: 0 0 0 2px var(--text-color);
}

.video-item h3 {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    color: var(--secondary-color);
    text-align: center;
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    max-width: 90%;
    word-wrap: break-word;
}

/* Button Styles */
:where(.dropdown-btn, .contact-form button, .clear-cache-btn, .share-button, h2) {
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
}

@media (prefers-reduced-motion: reduce) {
    :where(.dropdown-btn, .contact-form button, .clear-cache-btn, .share-button, h2) {
        transition: none; /* Respect user motion preferences */
    }
}

.dropdown-btn, h2 {
    font-size: 2rem;
    padding: 0.8rem 2rem;
    text-shadow: 2px 2px var(--shadow-color);
    display: block;
    margin: 2rem auto;
    width: 100%;
    text-align: center;
}

.contact-form button {
    font-size: 1.5rem;
    padding: 0.8rem 2rem;
}

.contact-form button:hover, .contact-form button:focus {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--text-color);
}

.clear-cache-btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
}

.clear-cache-btn:hover, .clear-cache-btn:focus {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--text-color);
}

.share-button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}

.share-button:hover, .share-button:focus {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--text-color);
}

.share-message {
    display: none;
    font-size: 1rem;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.share-message.success {
    display: block;
    color: var(--success-color);
}

.share-message.error {
    display: block;
    color: var(--error-color);
}

/* Dropdown Section */
.dropdown {
    text-align: center;
    margin: 2rem auto 1rem;
}

.dropdown-content {
    display: none;
    max-width: 1000px;
    margin: 1rem auto;
    padding: 2rem;
    background: var(--bg-transparent);
    border-radius: 20px;
    text-align: center;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content:not(.show) {
    inert: true; /* Improve accessibility for hidden content */
}

.dropdown-content h2 {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    color: var(--text-color);
    font-size: 2rem;
    margin: 1rem 0;
    text-shadow: 2px 2px var(--shadow-color); /* Match divider style */
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-transparent);
    border-radius: 20px;
    text-align: center;
}

.contact-form h2 {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px var(--shadow-color); /* Match divider style */
}

.contact-form form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-form label {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    font-size: 1.2rem;
    color: var(--text-color);
    text-align: left;
    width: 100%;
    max-width: 500px;
}

.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1rem;
    background: var(--bg-input);
    color: var(--text-dark);
}

.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--primary-color);
}

.contact-form input[type="email"] {
    pattern: "[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$";
    title: "Please enter a valid email address";
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.form-message {
    display: none;
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 1rem;
}

.form-message.success {
    display: block;
    color: var(--success-color);
}

.form-message.error {
    display: block;
    color: var(--error-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: var(--primary-color);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1rem;
}

footer nav {
    margin: 1rem 0;
}

footer nav a {
    color: var(--text-color);
    margin: 0 1rem;
    text-decoration: none;
}

footer nav a:hover, footer nav a:focus {
    text-decoration: underline;
    box-shadow: 0 0 0 2px var(--text-color);
}

/* Media Queries */
@media (max-width: 1024px) {
    .video-content {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        margin-bottom: 3rem;
    }
    .video-item {
        max-width: 350px;
        padding: 1.5rem 1rem;
    }
    .video-item iframe {
        width: 85%;
    }
    .video-item h3 {
        font-size: 1.1rem;
    }
    .divider {
        font-size: 1.8rem;
        padding: 0.6rem 1.5rem;
        margin: 1.5rem auto;
    }
}

@media (max-width: 768px) {
    .video-content {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
    }
    .video-item {
        max-width: 300px;
        padding: 1.5rem 1rem;
    }
    .video-item iframe {
        width: 90%;
    }
    .video-item h3 {
        font-size: 1rem;
    }
    .video-item iframe, .video-item--even iframe {
        transform: rotate(0deg); /* Remove rotation on mobile for usability */
    }
    .divider {
        font-size: 1.5rem;
        padding: 0.5rem 1.2rem;
        margin: 1rem auto;
    }
    header h1 {
        font-size: 2.5rem;
    }
    .contact-form button, .clear-cache-btn, .share-button {
        font-size: 1.2rem;
        padding: 0.6rem 1.5rem;
    }
    .contact-form {
        padding: 1.5rem;
    }
    .contact-form h2 {
        font-size: 1.8rem;
    }
    .contact-form label {
        font-size: 1rem;
    }
    .contact-form input[type="email"],
    .contact-form textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    .contact-form textarea {
        height: 120px;
    }
    .dropdown-content h2 {
        font-size: 1.8rem;
        text-shadow: 2px 2px var(--shadow-color);
    }
}