/* Version 2.0 - Blue theme with condensed spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1f3d44;
    min-height: 100vh;
    padding: 20px;
    color: #3C3C3C;
    font-size: 15px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #F7F7F7;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: #2D545E;
    color: #FFFFFF;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 0.9rem;
    color: #FFFFFF;
    opacity: 0.9;
    margin-top: 10px;
    line-height: 1.5;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

.column {
    padding: 25px 40px 40px 40px;
}

.input-column {
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.output-column {
    background: white;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

h2 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #2D545E;
    font-weight: 600;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.header-row h2 {
    margin-bottom: 0;
}

.clear-all-btn {
    padding: 8px 16px;
    background: #2D545E;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Open Sans', 'Roboto', sans-serif;
}

.clear-all-btn:hover {
    background: #1f3d44;
    transform: translateY(-1px);
}

.input-group {
    margin-bottom: 16px;
    padding-left: 12px;
    padding-top: 2px;
    padding-bottom: 2px;
    position: relative;
}

.input-group::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #2D545E;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 95%);
}

.input-group-secondary::before {
    background: #5a9aa8;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #3C3C3C;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.input-group label.highlight {
    background: #FFEAA7;
    box-shadow: -3px 0 0 #FFEAA7;
}

.label-subtitle {
    font-weight: normal !important;
    font-style: italic;
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 2px;
}

.input-group input[type="number"],
.input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

.input-group input[type="number"]:focus,
.input-group select:focus {
    outline: none;
    border-color: #2D545E;
    box-shadow: 0 0 0 3px rgba(45, 84, 94, 0.1);
}

.checkbox-wrapper {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group-vertical label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.radio-group-vertical input[type="radio"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.label-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-button label {
    margin-bottom: 0;
}

.checkbox-group {
    margin-top: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.clear-btn {
    padding: 4px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: #5a6268;
}

.conditional {
    background: #FFEAA7;
    padding: 15px;
    padding-left: 15px;
    border-radius: 6px;
    border-left: none;
    margin-bottom: 14px;
    min-height: 75px;
}

.conditional::before {
    display: none;
}

.output-group {
    margin-bottom: 18px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2D545E;
}

.output-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #3C3C3C;
    font-size: 1rem;
}

.output-value {
    font-size: 1.05rem;
    color: #3C3C3C;
    line-height: 1.6;
    min-height: 24px;
}

.output-value:empty::before {
    content: '-';
    color: #adb5bd;
}

.public-domain {
    color: #27ae60;
    font-weight: 600;
}

.copyright-protected {
    color: #2980b9;
    font-weight: 600;
}

/* Scrollbar Styling */
.input-column::-webkit-scrollbar,
.output-column::-webkit-scrollbar {
    width: 8px;
}

.input-column::-webkit-scrollbar-track,
.output-column::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.input-column::-webkit-scrollbar-thumb,
.output-column::-webkit-scrollbar-thumb {
    background: #2D545E;
    border-radius: 4px;
}

.input-column::-webkit-scrollbar-thumb:hover,
.output-column::-webkit-scrollbar-thumb:hover {
    background: #1f3d44;
}

.disclaimer {
    padding: 20px 40px 5px 40px;
    background: #3B6B78;
    border-top: 2px solid #2D545E;
    font-size: 0.95rem;
    color: #FFFFFF;
    line-height: 1.6;
}

.disclaimer p {
    margin: 0;
}

.disclaimer-title {
    font-weight: bold;
    color: #FFB347;
}

.feedback-section {
    padding: 5px 40px 15px 40px;
    background: #3B6B78;
    text-align: left;
    font-size: 0.95rem;
    color: #FFFFFF;
    border-top: none;
}

.feedback-section p {
    margin: 0;
}

.feedback-section .copyright-text {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 10px;
}

.feedback-section a {
    color: #74E8D3;
    text-decoration: none;
}

.feedback-section a:hover {
    text-decoration: underline;
}

.copyright {
    padding: 5px 40px 15px 40px;
    background: #3B6B78;
    color: #FFFFFF;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
}

.copyright p {
    margin: 0;
}

.feedback {
    margin-top: 8px !important;
    font-size: 0.85rem !important;
}

/* Responsive Design */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .input-column {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        max-height: none;
    }
    
    .output-column {
        max-height: none;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .column {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.25rem;
        margin-bottom: 20px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    #searchBtn,
    #musicSearchBtn,
    #architectureSearchBtn {
        width: 100%;
    }
}

/* Book Search Section */
.book-search-section {
    background: #E8F4F8;
    padding: 20px;
    margin: 25px 30px 15px 30px;
    border-radius: 8px;
    border: 2px solid #2D545E;
}

.book-search-section h2 {
    color: #2D545E;
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.book-search-subtitle {
    color: #5A7C89;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.book-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

.book-warning strong {
    color: #856404;
}

.work-type-selector {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #2D545E;
}

.work-type-selector label {
    display: block;
    font-weight: 500;
    color: #2D545E;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

#workTypeSelect {
    padding: 10px 15px;
    border: 2px solid #2D545E;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

#workTypeSelect:focus {
    outline: none;
    border-color: #12B7E8;
    box-shadow: 0 0 0 3px rgba(18, 183, 232, 0.1);
}

.search-fields-container {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.search-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.search-input-group label {
    font-weight: 500;
    color: #2D545E;
    font-size: 0.9rem;
}

#bookTitleSearch,
#bookAuthorSearch,
#musicTitleSearch,
#musicArtistSearch,
#architectureBuildingSearch,
#architectureArchitectSearch {
    padding: 12px 15px;
    border: 2px solid #2D545E;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
}

#bookTitleSearch:focus,
#bookAuthorSearch:focus,
#musicTitleSearch:focus,
#musicArtistSearch:focus,
#architectureBuildingSearch:focus,
#architectureArchitectSearch:focus {
    outline: none;
    border-color: #12B7E8;
    box-shadow: 0 0 0 3px rgba(18, 183, 232, 0.1);
}

#searchBtn,
#musicSearchBtn,
#architectureSearchBtn {
    padding: 12px 30px;
    background: #2D545E;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

#searchBtn:hover,
#musicSearchBtn:hover,
#architectureSearchBtn:hover {
    background: #12B7E8;
}

#searchBtn:disabled,
#musicSearchBtn:disabled,
#architectureSearchBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.book-results-container {
    min-height: 20px;
}

.search-source-info {
    padding: 10px;
    margin-bottom: 15px;
    background: #E8F4F8;
    border-left: 4px solid #12B7E8;
    border-radius: 4px;
    color: #2D545E;
    font-size: 0.9rem;
}

.search-source-divider {
    padding: 10px;
    margin: 20px 0 15px 0;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    border-radius: 4px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
}

.book-loading {
    text-align: center;
    padding: 20px;
    color: #5A7C89;
    font-style: italic;
}

.book-result {
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #2D545E;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.book-result:hover {
    border-color: #12B7E8;
    box-shadow: 0 4px 12px rgba(18, 183, 232, 0.2);
    transform: translateY(-2px);
}

.book-title {
    font-weight: 600;
    color: #2D545E;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.book-author {
    color: #5A7C89;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.book-year {
    color: #12B7E8;
    font-size: 0.9rem;
    font-weight: 500;
}

.book-info-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #2D545E;
    color: #5A7C89;
    text-align: center;
}

.book-error {
    color: #d32f2f;
    padding: 15px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 6px;
    margin-bottom: 15px;
}

.book-success {
    color: #2e7d32;
    padding: 15px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    margin-bottom: 15px;
}
