/* Reset some defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Body styling */
body {
    background: linear-gradient(135deg, #E0C3FC, #8EC5FC);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #333;
}

/* Main container */
.container {
    background: #ffffffcc; /* semi-transparent white */
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem 3rem;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Responsive container for mobile */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1.5rem;   /* smaller padding */
        max-width: 95%;            /* almost full width */
    }
}

/* Headings */
.container h1 {
    text-align: center;
    color: #222;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.top-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.howtousebutton {
    margin-left:auto;
    margin-right:auto;
    margin-bottom: 1.5rem;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    text-decoration: none;
    color: #070300;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.howtousebutton:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Form sections */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 10px rgba(37,117,252,0.3);
}

#chordInput {
    resize: vertical;    /* only allow vertical resizing */
    overflow-y: auto;    /* scroll bar if content too tall */
    width: 100%;         /* keep full width */
    min-height: 80px;    /* optional starting height */
    max-height: 400px;   /* optional max height */
}

/* File inputs */
input[type="file"] {
    padding: 0.3rem;
}

/* Buttons */
button {
    display: inline-block;
    background: #2575fc;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 1rem;
    width: 100%;  /* full width on mobile */
}

button:hover {
    background: #6a11cb;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Audio player */
audio {
    width: 100%;
    margin-top: 1rem;
}

/* Output box */
#analysis-output {
    margin-top: 2rem;
    background: #f7f9fc;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    color: #333;
}

#result {
    max-width: 700px;        /* keeps text in a readable column */
    margin: 0 auto;           /* center horizontally */
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;    /* preserves line breaks */
}

.analysis-section {
    margin-bottom: 20px;
}

.analysis-section strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 6px;
    color: #1976d2;
}

/* Responsive tweaks */
@media (max-width: 500px) {
    button {
        padding: 0.7rem 1.2rem;  /* slightly smaller for narrow screens */
        font-size: 0.95rem;
    }

    #chordInput {
        min-height: 60px;  /* slightly smaller on iPhone */
    }
}

.homepagebackreference {
    display:inline-block;
    font-weight:bold;
    text-decoration:none;
    color: #222222;
    display: flex;
    justify-content: center;
}

.homepagebackreference:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

#Limitations {
    text-align: center;
    padding-top:8px;
}

.container .form-group .formLength {
    margin-top: -1rem;
    font-size: 0.7rem;
    color: #555;
    text-align:right;
    margin-right:0.6rem;
}

footer {
    margin-top: 1rem;
}
