@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root {
  --piano-white: #f8f8f8;
  --piano-black: #333333;
  --piano-accent: #d4af37; /* Gold */
  --wood-bg: #754c24;
  --primary-blue: #4a569d;
  --secondary-blue: #1e3c72;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to right, var(--secondary-blue), var(--primary-blue));
    color: var(--piano-white);
    text-align: center;
    margin: 0;
    padding: 0;
}

/* Add a subtle wood grain texture to the background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/wood-grain-texture.png');
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

header {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    padding: 20px;
    background: var(--primary-blue);
    color: var(--piano-white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

#logo {
    height: 120px;
    margin-right: 20px;
}

header h1 {
    font-size: 3rem;
    font-family: 'Libre Baskerville', serif;
    margin: 0;
}

#piano-container {
    margin: 50px auto;
    display: flex;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
}

#piano-border {
    padding: 10px;
    border: 5px solid;
    border-image: linear-gradient(to right, #ff0080, #ff8c00, #40e0d0, #ff0080) 1;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#piano {
    display: flex;
    position: relative;
    flex-wrap: nowrap;
}

#key-guide-container {
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#key-guide {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.guide-key {
    width: 40px;
    height: 40px;
    background-color: #fff;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
}

.guide-key:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.key.highlighted {
    background-color: #ffff00 !important;
    transition: background-color 0.3s;
}

.key.black.highlighted {
    background-color: #ffa500 !important;
}

.key {
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.key.white {
    width: 25px;
    height: 150px;
    background: linear-gradient(to bottom, var(--piano-white), #e0e0e0);
    border: 1px solid #999;
    z-index: 1;
}

.key.black {
    width: 15px;
    height: 100px;
    background: linear-gradient(to bottom, var(--piano-black), #000);
    border: 1px solid #000;
    position: absolute;
    z-index: 2;
    margin-left: -7.5px;
}

.key.active {
    transform: scale(0.95);
    background: var(--piano-accent);
}

.key.black.active {
    background: #555;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.octave-shift {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.octave-shift button {
    margin: 0 10px;
    padding: 5px 10px;
    background-color: #2a5298;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.octave-shift button:hover {
    background-color: #1e3c72;
}

#octave-display {
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
}

.note-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #333;
    display: none;
}

.key.black .note-label {
    color: #fff;
    bottom: 15px;
}

.control-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.control-group button {
    margin: 0 5px;
}

.instrument-select {
    display: flex;
    align-items: center;
}

.instrument-select select {
    padding: 5px;
    border-radius: 5px;
    background-color: #2a5298;
    color: white;
    border: none;
}

.volume-control, .sustain-control {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.volume-control label, .sustain-control label {
    margin-right: 10px;
}

#volume {
    width: 100px;
}

#sustain {
    transform: scale(1.5);
}

button {
    padding: 10px 20px;
    margin: 5px;
    background: var(--primary-blue);
    border: none;
    color: var(--piano-white);
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: var(--secondary-blue);
    transform: scale(1.05);
}

button img {
    width: 20px;
    height: 20px;
}

footer {
    padding: 10px;
    background: var(--secondary-blue);
    color: var(--piano-white);
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3);
}

#metronome, #socialSharing, #customization, #sounds, #ads {
    margin: 20px;
}

#metronome input {
    width: 80px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    text-align: center;
}

#socialSharing {
    margin-top: 20px;
    padding: 10px;
    background: white;
    color: black;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#socialSharing h3 {
    margin-bottom: 10px;
}

#socialSharing a {
    margin: 5px;
    transition: transform 0.2s;
}

#socialSharing a img {
    width: 40px;
    height: 40px;
}

#socialSharing a:hover {
    transform: scale(1.1);
}

#footer-content {
    background-color: white;
    color: black;
    padding: 20px;
    text-align: left;
    margin-top: 20px;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#footer-content .column {
    flex: 1 1 45%;
    margin: 10px;
}

#footer-content h2,
#footer-content h3 {
    color: var(--primary-blue);
}

#footer-content p,
#footer-content ul {
    color: black;
}

#footer-content ul {
    list-style: none;
    padding: 0;
}

#footer-content ul li {
    margin-bottom: 10px;
}

#footer-content ul li strong {
    color: #ff8c00;
}

#socialSharingFooter {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#socialSharingFooter a {
    margin: 0 10px;
    transition: transform 0.2s;
}

#socialSharingFooter a img {
    width: 30px;
    height: 30px;
}

#socialSharingFooter a:hover {
    transform: scale(1.1);
}

/* Blog Styling */
.article-snippet {
    background: white;
    color: black;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.article-snippet h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.article-snippet h3 a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.article-snippet h3 a:hover {
    color: var(--piano-accent);
}

.article-snippet p {
    font-size: 1rem;
    line-height: 1.5;
}

.article-snippet a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: bold;
}

.article-snippet a:hover {
    text-decoration: underline;
}

/* Article Page Styling */
article {
    max-width: 800px;
    margin: 50px auto;
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
}

article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1e3c72;
}

article p {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    #logo {
        height: 80px;
    }

    #piano-container {
        width: 100%;
        padding: 0 10px;
    }

    .guide-key {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
    }

    .key.white {
        width: 20px;
        height: 120px;
    }

    .key.black {
        width: 12px;
        height: 80px;
    }

    #controls {
        margin-top: 10px;
    }

    button {
        padding: 8px 16px;
        margin: 3px;
    }

    .volume-control, .sustain-control {
        flex-direction: column;
        align-items: flex-start;
    }

    #volume {
        width: 100%;
    }

    #footer-content {
        flex-direction: column;
    }

    #footer-content .column {
        flex: 1 1 100%;
        margin: 0;
    }

    .article-snippet {
        margin: 10px 0;
    }

    article {
        margin: 20px 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    #logo {
        height: 60px;
    }

    #piano-container {
        width: 100%;
        padding: 0 5px;
    }

    .guide-key {
        width: 25px;
        height: 25px;
        font-size: 0.7em;
    }

    .key.white {
        width: 15px;
        height: 100px;
    }

    .key.black {
        width: 10px;
        height: 60px;
    }

    #controls {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        margin: 5px 0;
    }

    #footer-content .column {
        margin: 10px 0;
    }

    .article-snippet {
        margin: 10px 0;
    }

    article {
        margin: 10px 5px;
        padding: 10px;
    }
}

/* Footer Menu Styling */
#footer-menu a {
    color: white;
    text-decoration: none;
    padding: 0 10px;
    display: inline-block;
}

#footer-menu a:visited {
    color: white;
}

#footer-menu a:hover {
    color: #ff8c00;
}

#footer-menu a:active {
    color: #40e0d0;
}

/* Additional Spacing */
#footer-menu a + a {
    margin-left: 15px;
}