/* Church Song Book - PHP Version Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f8f9fa;
}

/* Font Size Controls */
.font-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
}

.font-controls.show {
    display: flex;
}

.font-btn {
    background: #8B4513;
    color: white;
    border: none;
    border-radius: 20px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.font-btn:hover {
    background: #A0522D;
    transform: scale(1.1);
}

/* Header */
header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header .subtitle {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.9;
    text-transform: uppercase;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    min-height: calc(100vh - 120px);
}

/* Section Styles */
section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

section h2 {
    font-size: 1.5rem;
    color: #8B4513;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* Upcoming Service Styles */
.upcoming-service {
    margin-bottom: 2rem;
}

.service-info h3 {
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.service-songs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background: #ffffff;
}

/* Full clickable song item */
.song-link-full {
    cursor: pointer;
}

.song-item:hover,
.song-link-full:hover {
    background: #f8f9fa;
    border-color: #8B4513;
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.song-number {
    background: #8B4513;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.song-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.song-link:hover {
    text-decoration: none;
    color: inherit;
}

.song-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0;
    line-height: 1.3;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header .subtitle {
        font-size: 0.8rem;
        letter-spacing: 1.5px;
    }
    
    main {
        padding: 15px;
    }
    
    .upcoming-service, .song-search {
        padding: 20px 15px;
    }
    
    .upcoming-service h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .service-info h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .song-item {
        padding: 15px;
        margin: 10px 0;
    }
    
    .song-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 18px;
    }
    
    /* Mobile adjustments for font controls */
    .font-controls {
        display: none; /* Hide floating font controls on mobile */
    }
    
    .font-controls-toggle {
        display: none; /* Hide floating font controls toggle on mobile */
    }
    
    .song-title {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.4;
    }
    
    /* Money bag icon styling for mobile */
    .song-number i.fas.fa-money-bill-wave {
        font-size: 18px;
    }
    
    .song-search h2 {
        font-size: 22px;
        margin: 30px 0 20px 0;
    }
    
    .search-form input {
        font-size: 16px;
        padding: 14px 45px 14px 15px;
    }
    
    .search-form button {
        font-size: 16px;
        padding: 14px 28px;
    }
    
    .song-footer {
        padding: 25px 20px;
    }
    
    .song-footer .back-btn {
        padding: 14px 28px;
        font-size: 18px;
    }
}

/* Extra mobile styles for very small screens */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
        padding: 12px 0;
    }
    
    header .subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    main {
        padding: 12px;
    }
    
    .upcoming-service h2 {
        font-size: 22px;
    }
    
    .service-info h3 {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 15px;
    }
    
    .service-songs {
        gap: 6px;
    }
    
    main {
        padding: 12px;
    }
    
    .upcoming-service h2 {
        font-size: 20px;
    }
    
    .service-info h3 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 12px;
    }
    
    .service-songs {
        gap: 5px;
    }
    
    .song-item {
        padding: 8px 10px;
    }
    
    .song-title {
        font-size: 24px;
        font-weight: 700;
    }
    
    .song-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 20px;
    }
    
    .song-number i {
        font-size: 20px;
    }
    
    /* Money bag icon styling for small mobile */
    .song-number i.fas.fa-money-bill-wave {
        font-size: 20px;
    }
    
    .search-form input {
        font-size: 18px;
        padding: 18px;
    }
    
    .search-form button {
        font-size: 18px;
        padding: 18px 30px;
    }
    
    /* Mobile search box styles */
    .search-form {
        gap: 12px;
    }
    
    .search-input-container {
        border-radius: 25px;
    }
    
    .search-input-container input[type="text"] {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    .search-btn-icon {
        padding: 14px 18px;
        min-width: 55px;
        font-size: 1rem;
    }
    
    .search-btn-main {
        padding: 14px 28px;
        font-size: 1rem;
        border-radius: 25px;
    }
    
    .clear-search-btn {
        right: 70px;
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .song-footer .back-btn {
        padding: 16px 32px;
        font-size: 18px;
        font-weight: 700;
    }
}

/* Search page styling */
.search-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.search-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.search-header .back-btn {
    background: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.search-header .back-btn:hover {
    background: var(--primary-hover);
    text-decoration: none;
    color: white;
}

.search-results-header {
    margin: 30px 0 20px 0;
    padding: 15px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.search-results-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin: 30px 0;
    transition: background-color 0.3s ease;
}

.no-results h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.no-results p {
    color: var(--text-secondary);
    margin: 5px 0;
}

/* Search footer for bottom back button */
.search-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Song footer for bottom back button */
.song-footer {
    margin-top: 30px;
    padding: 20px 30px;
    text-align: center;
    border-top: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.song-footer .back-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-medium);
}

.song-footer .back-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-heavy);
    text-decoration: none;
    color: white;
}

.song-language {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Error Styles */
.error-section {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.error {
    color: #d32f2f;
    font-weight: bold;
    margin: 10px 0;
}

/* Search Styles */
.song-search {
    margin-bottom: 2rem;
}

.search-form {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-input-container:hover {
    border-color: #8B4513;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.15);
}

.search-input-container:focus-within {
    border-color: #8B4513;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.2);
    transform: translateY(-1px);
}

.search-input-container input[type="text"] {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: #2d3748;
    outline: none;
    font-weight: 500;
}

.search-input-container input[type="text"]::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-btn-icon {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: none;
    color: white;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    border-radius: 0;
}

.search-btn-icon:hover {
    background: linear-gradient(135deg, #A0522D, #CD853F);
    transform: scale(1.05);
}

.search-btn-icon:active {
    transform: scale(0.98);
}

.search-btn-main {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-btn-main:hover {
    background: linear-gradient(135deg, #A0522D, #CD853F);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.search-btn-main:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.2);
}

.clear-search-btn {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: #f7fafc;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    transform: translateY(-50%) scale(1.1);
}

/* Remove old button styles */
.search-form button[type="submit"] {
    /* Keep the new styles above */
}

.search-results-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.search-results-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-results p {
    margin: 0.5rem 0;
}

/* Song Page Styles */
.song-page {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-medium);
    padding: 0;
    margin: 20px 0;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.song-header {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.song-header .song-number-display {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: white;
}

.print-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.print-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.song-content {
    padding: 30px;
}

.song-header-info {
    margin-bottom: 25px;
}

.song-number-display {
    background: #8B4513;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#song-page-title {
    font-size: 2rem;
    color: #8B4513;
    margin-bottom: 10px;
}

#song-page-language {
    background: #f8f9fa;
    color: #8B4513;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 25px;
}

/* Language Tabs */
.language-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 22px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.tab-btn.active {
    color: #8B4513;
    border-bottom-color: #8B4513;
}

.tab-btn:hover {
    color: #8B4513;
    background: rgba(139, 69, 19, 0.05);
}

/* Lyrics Content */
.lyrics-content {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.lyrics-text {
    line-height: 1.0;
    font-size: 16px;
    color: #333;
    white-space: pre-line;
    padding: 20px 0;
}

.lyrics-container {
    display: grid;
    gap: 30px;
}

.lyrics-section h3 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

#song-page-lyrics-original,
#song-page-lyrics-english {
    line-height: 1.0;
    font-size: 16px;
    color: #333;
    white-space: pre-line;
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

@media (min-width: 768px) {
    .lyrics-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 0.5rem 10px;
    }
    
    section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    section h2 {
        font-size: 1.3rem;
    }
    
    .song-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .song-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        text-align: left;
        padding: 15px 10px;
    }
    
    .song-header .song-number-display {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .song-content {
        padding: 10px;
    }
    
    .song-header-info {
        margin-bottom: 15px;
    }
    
    .song-number-display {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 12px;
    }
    
    #song-page-title {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .language-tabs {
        gap: 5px;
        margin-bottom: 15px;
    }
    
    .tab-btn {
        padding: 12px 18px;
        font-size: 22px;
    }
    
    .lyrics-text {
        padding: 10px 0;
        font-size: 15px;
    }
}

/* Footer Styles */
.app-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px;
    text-align: center;
    margin-top: 40px;
}

.app-footer p {
    margin: 0;
    font-size: 11px;
    color: #6c757d;
    line-height: 1.4;
    text-align: center;
}

.app-footer a {
    color: #8B4513;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.app-footer a:hover {
    color: #A0522D;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .app-footer {
        padding: 12px;
        margin-top: 30px;
    }
    
    .app-footer p {
        font-size: 10px;
    }
}

/* View All Songs Section */
.view-all-songs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.view-all-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.view-all-btn {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #A0522D, #8B4513);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
    text-decoration: none;
    color: white;
}

.view-all-btn i {
    font-size: 18px;
}

.view-all-description {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .view-all-songs {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    .view-all-btn i {
        font-size: 16px;
    }
    
    .view-all-description {
        font-size: 13px;
    }
}

/* Mobile Font Controls */
.mobile-font-controls {
    display: none;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-font-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mobile-font-btn {
    background: #8B4513;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-font-btn:hover {
    background: #A0522D;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.mobile-font-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Show mobile font controls only on mobile devices */
@media (max-width: 768px) {
    .mobile-font-controls {
        display: block;
    }
    
    /* Hide the floating font controls on mobile */
    .font-controls,
    .font-controls-toggle {
        display: none !important;
    }
}