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

body {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    overflow-x: hidden;
    background-color: #00001a5c;
    background-image: url('img/gluehuffer.jpg');
    background-repeat: repeat;
    background-size: 50px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: floatDown 1s ease-out;
}

header h1 {
    font-size: 3.5rem;
    background: linear-gradient(90deg, #ff0000, #00ffff, #0000ff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    color: #b3a0cc;
    margin-top: 0.5rem;
}

.submit-section, .messages-section {
    background: rgb(42, 42, 73);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 20, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.messages-section {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

#guestbook-info {
    background-color: #2a2a49;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 20, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#guestbook-info h2 {
    color: #00ffff;
    margin-bottom: 1rem;
}

#guestbook-info p {
    line-height: 1.6;
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #224;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #7fe8ff;
    box-shadow: 0 0 15px rgba(108, 243, 255, 0.4);
}

.captcha-box {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 88, 255, 0.1);
    border-left: 4px solid #0088ff;
    border-radius: 8px;
}

.captcha-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #00ccff;
}

.captcha-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #0088ff;
    border-radius: 8px;
    color: #fff;
    padding: 0.8rem;
    font-size: 1rem;
}

.captcha-box input:focus {
    outline: none;
    border-color: #7fe8ff;
}

.midi-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 88, 255, 0.05);
    border: 1px solid #0088ff;
    border-radius: 8px;
}

.midi-section label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #00ccff;
}

.midi-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #0088ff;
    color: #0088ff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    box-shadow: none;
    width: auto;
}

.tab-btn.active {
    background: #0088ff;
    color: #000;
}

.sequencer-grid {
    display: grid;
    grid-template-rows: repeat(4, 30px);
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 1rem;
}

.seq-row {
    display: flex;
    gap: 4px;
}

.seq-cell {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #0088ff;
    border-radius: 4px;
    cursor: pointer;
}

.seq-cell.active {
    background: #00ffff;
    box-shadow: 0 0 10px #00ffff;
}

.seq-controls {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 1rem;
}

.secondary-btn {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
    box-shadow: none;
    margin-top: 0;
}

midi-player {
    display: block;
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

button {
    background: linear-gradient(45deg, #00aaff, #00ffff);
    color: #000;
    border: none;
    border-radius: 30px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    box-shadow: 0 5px 15px rgba(0, 204, 255, 0.4);
}

button:hover {
    box-shadow: 0 4px 25px rgba(0, 204, 255, 0.6);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    min-height: 24px;
}

.status-error {
    color: #ff0000;
}

.status-success {
    color: #00ff00;
}

.status-loading {
    color: #9090ff;
}

#messages-container {
    display: grid;
    gap: 1.5rem;
}

.message-card {
    background: rgba(255, 255, 255, 0.03);
    border-left: 5px solid #0088ff;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease-out backwards;
}

.message-card:hover {
    border-left-color: #00ffff;
}

.message-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: #ffffff;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.nav-btn {
    width: auto;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

#page-info {
    font-weight: 800;
    color: #0088ff;
}

@keyframes floatDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

midi-player {
    color: black;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.user-info-input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #636bac;
    border-radius: 5px;
    background: #111;
    color: #fff;
}

.user-info-input:focus {
    border-color: #7fe8ff;
    outline: none;
    box-shadow: none;
}

#clear-seq-btn {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff4444;
    color: #ff4444;
    display: none;
}

.red-button:hover {
    box-shadow: 0 4px 25px rgba(233, 71, 71, 0.6);
}

.message-header {
    margin-bottom: 10px;
    font-weight: bold;
}

.message-header-links {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
    margin-top: 5px;
}

.message-header-links a {
    color: #00ffff;
    text-decoration: none;
}

.empty-messages {
    text-align: center;
    color: #888;
}

#seq-grid {
    cursor: pointer;
}