body {
    margin: 0;
    padding: 0;
}
#inputs {
    flex: 0 0 auto;
}
.title {
    display: block;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px auto 20px;
    background: white;
    width: 200px;
    text-align: center;
}
.title:hover {
    background: #f0f0f0;
    border-color: #999;
}
#titleinput {
    text-align: center;
    margin: 10px auto 20px;
    display: none;
}
#titleinput input {
    font-size: 18px;
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 200px;
    text-align: center;
    background: white;
}
#noninputs {
    flex: 0 0 auto;
    width: 530px;
}
#visual { height: 400px; width: 480px; }
textarea {
    width: 480px;
    max-width: 100%;
    height: 150px;
    margin-top: 20px;
    box-sizing: border-box;
}
.content-wrapper {
    clear: both;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
h1 { text-align: center; }
h1 span { border-radius: 5px; padding: 3px; }
h2 { text-align: center; margin: 15px auto; }
.box { display: inline-block; height: 20px; margin: 0px 10px -8px 0px; width: 20px; padding: 3px; }
pre { font-weight: bold; line-height: 1em; font-family: monospace; }
.main {
    position: relative;
    overflow: hidden;
    height: 30em;
    width: 480px;
    font-size: 13px;
    padding: 0 0 0 70px;
    text-align: left;
}
.song-title {
    display: inline-block;
    margin-left: -60px;
    word-spacing: normal;
}
.menu {
    position: absolute;
    left: 5px;
    top: 2em;
    width: 50px;
    padding: 5px;
    text-align: left;
    z-index: 1;
}
.note {
    position: absolute;
    bottom: 0;
    height: 3em;
    width: 21px;
    text-align: center;
    padding: 2px;
    overflow: hidden;
}
.rntxt { font-weight: normal; }
.bgtext { padding: 0 2px; }
.n1 { left: 90px; }
.n2 { left: 114px; }
.n3 { left: 138px; }
.n4 { left: 162px; }
.n5 { left: 186px; }
.n6 { left: 210px; }
.n7 { left: 234px; }
.n8 { left: 258px; }

/* New styles for buttons */
.action-buttons {
    margin: 30px 0;
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
}
.action-buttons button {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid #35748B;
    background: white;
    border-radius: 5px;
    transition: all 0.3s;
    width: 250px;
}
.action-buttons button:hover:not(:disabled) {
    background: #35748B;
    color: white;
}
.action-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal styles */
#themeModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow: auto;
}
.modal-content {
    background: white;
    margin: 30px auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    margin: 0;
}
.close-button {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}
.close-button:hover {
    color: #000;
}
#themeSearch {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}
#themeGrid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.theme-card {
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.theme-card:hover {
    transform: scale(1.05);
    border-color: #35748B;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.theme-card:hover .theme-name-overlay {
    opacity: 1;
}
.theme-name-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    font-weight: bold;
}
.theme-preview {
    width: 100%;
    height: 240px;
    position: relative;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}
.theme-preview .preview-main {
    position: relative;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.pagination-button {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #35748B;
    background: white;
    border-radius: 5px;
}
.pagination-button:hover:not(:disabled) {
    background: #35748B;
    color: white;
}
.pagination-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
#pageInfo {
    font-weight: bold;
}
.loading-message, .error-message, .no-results {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}
.error-message {
    color: #d32f2f;
}
.retry-button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid #d32f2f;
    background: white;
    border-radius: 5px;
}
.retry-button:hover {
    background: #d32f2f;
    color: white;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}
.toast.show {
    opacity: 1;
        }

/* Color picker styles */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.color-input-group label {
    width: 100px;
}
.color-input-group input[type="color"] {
    width: 50px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}
.color-input-group input[type="text"] {
    width: 80px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: monospace;
}

@media (max-width: 1024px) {
    #themeGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    #themeGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    #themeGrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
}
