/* ===================================================================
   Base & General Styles
=================================================================== */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Default background for most pages */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Pushes footer down on short pages */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===================================================================
   Header & Navigation
=================================================================== */
header, .navbar.bg-dark {
    background-color: #1a2a5c !important; /* Main brand color */
    color: white;
}

header .container { /* For non-Bootstrap header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.navbar-brand img, .logo img {
    height: 80px !important; /* Force logo size */
    width: auto !important;
    max-height: none !important;
}

nav ul { /* For non-Bootstrap nav */
    display: flex;
    list-style: none;
    margin: 0; padding: 0;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: #65c6f4;
}

/* Override for Bootstrap nav links if needed */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}
.navbar-dark .dropdown-menu {
    background-color: #343a40;
}
.navbar-dark .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
}
.navbar-dark .dropdown-item:hover {
    color: #fff;
    background-color: #495057;
}

/* ===================================================================
   Hero Section (index.php)
=================================================================== */
.hero-section {
    background-color: #1a2a5c;
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================================================
   Main Content Cards & Containers (Shared Styles)
=================================================================== */
.page-section {
    padding: 3rem 0;
}

.content-container {
    max-width: 800px; /* Default for pages like terms, privacy, faq */
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-container h1 {
    color: #1a2a5c;
    margin-bottom: 2rem;
    text-align: center;
}

.content-container h2 {
    color: #1a2a5c;
    margin: 2rem 0 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    font-size: 1.75rem;
}

.content-container h3 {
    margin: 1.5rem 0 0.5rem;
    color: #333;
    font-size: 1.4rem;
}

.content-container p, 
.content-container ul, 
.content-container ol {
    margin-bottom: 1rem;
}

.content-container ul, 
.content-container ol {
    padding-left: 1.5rem;
}

.content-container ul li, 
.content-container ol li {
    margin-bottom: 0.5rem;
}

/* ===================================================================
   Converter Box Styles (index.php)
=================================================================== */
.converter-box {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.converter-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a2a5c;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 3rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #1a2a5c;
    background-color: rgba(26, 42, 92, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: #1a2a5c;
    margin-bottom: 1rem;
}

.frequency-options {
    margin-bottom: 1.5rem;
}

.convert-btn {
    background-color: #1a2a5c;
    border-color: #1a2a5c;
    font-weight: 600;
    transition: all 0.3s ease;
}

.convert-btn:hover {
    background-color: #2a3a6c;
    border-color: #2a3a6c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 42, 92, 0.2);
}

/* --- Conversion Status & Result Styles (index.php) --- */
.conversion-counter {
    background-color: #e0f7fa;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.counter-value {
    font-weight: 600;
    color: #1a2a5c;
}

.result-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 0.75rem;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.detail-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-weight: 600;
    color: #1a2a5c;
}

.download-btn {
    background-color: #198754; /* Bootstrap Success Green */
    border-color: #198754;
    color: white;
    font-weight: 600;
}
.download-btn:hover {
    background-color: #157347;
    border-color: #146c43;
}

.share-btn {
    background-color: #e9ecef;
    color: #1a2a5c;
    font-weight: 600;
}
.share-btn:hover {
    background-color: #dee2e6;
}

.conversion-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

/* ===================================================================
   Feature & Info Card Styles (index.php, faq.php)
=================================================================== */
.benefit-card, .frequency-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover, .frequency-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2.5rem;
    color: #1a2a5c;
    margin-bottom: 1rem;
}

.frequency-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a2a5c;
    margin-bottom: 0.5rem;
}

.frequency-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===================================================================
   Login, Register, Settings Pages (Form Centric Pages)
=================================================================== */
.form-page-section {
    padding: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.form-page-container {
    width: 100%;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.login-container { max-width: 500px; }
.register-container { max-width: 600px; }
.settings-container { max-width: 700px; }

.form-page-container h1 {
    color: #1a2a5c;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-page-container h2 {
    color: #333;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.benefits-list {
    margin-bottom: 2rem;
    padding-left: 1.2rem;
}

.benefits-list li {
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-page-container .form-group {
    margin-bottom: 1.5rem;
}

.form-page-container .submit-btn {
    background-color: #1a2a5c;
    border: none;
    padding: 0.75rem 0;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
}
.form-page-container .submit-btn:hover { background-color: #2a3a6c; }

.form-page-container .login-link,
.form-page-container .register-link,
.form-page-container .forgot-password-link {
    text-align: center;
    margin-top: 1.5rem;
}

/* ===================================================================
   Dashboard Styles
=================================================================== */
.dashboard-card { transition: transform 0.2s; }
.dashboard-card:hover { transform: translateY(-2px); }
.stats-icon { font-size: 2.5rem; opacity: 0.8; }
.table-responsive { border-radius: 0.375rem; overflow: hidden; }
.history-actions .btn { margin: 1px; }

/* ===================================================================
   Support & Contact Page Specifics
=================================================================== */
.contribution-tier { border: 1px solid #ddd; padding: 1.25rem; margin-bottom: 1rem; border-radius: .375rem; transition: all 0.2s ease-in-out; }
.contribution-tier:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); transform: translateY(-2px); cursor: pointer; }
.contribution-tier h4 { color: #1a2a5c; margin-bottom: 0.5rem; }
.contribution-tier p { margin-bottom: 0.75rem; font-size: 0.95rem; }

.crypto-donation-section { background-color: #f8f9fa; padding: 2rem; border-radius: .375rem; }
.crypto-donation-section h3 { color: #1a2a5c; }
.crypto-donation-section ul li { margin-bottom: 0.5rem; list-style-type: none; }
.crypto-donation-section code { background-color: #e9ecef; padding: 0.2em 0.4em; border-radius: 3px; font-size: 0.85em; }

.contact-form .captcha-input { width: 100px; }

/* ===================================================================
   Footer
=================================================================== */
footer.bg-dark {
    margin-top: auto;
    background-color: #1a2a5c !important; /* Override Bootstrap if needed */
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-column h5 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: #fff;
}

.footer-column p {
    color: #ccc;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}
.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover { color: white; }
.footer-column .d-flex a {
    transition: color 0.3s ease;
}

.footer-column .d-flex a:hover {
    color: #ccc !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

/* ===================================================================
   Responsive Styles
=================================================================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .download-btn, .share-btn {
        display: block;
        width: 100%;
        margin-left: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    .donation-methods {
        grid-template-columns: 1fr;
    }
    
    .content-container { /* Applies to terms, privacy, faq, etc. */
        padding: 1.5rem;
    }
    
    .form-page-container { /* Applies to login, register, settings */
        padding: 1.5rem;
    }
    
    /* ===================================================================
   Verification & Status Page Styles
=================================================================== */
.status-page-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verification-container {
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.verification-container .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

/* Use this on <main> for pages with a single centered box (login, register, contact, verify) */
.page-layout-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 2rem 0;
}

/* Use this class on the main content div for text-heavy pages (faq, terms, privacy) */
.content-container-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Use this for the form boxes on login/register/contact */
.form-container-box {
    width: 100%;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.login-box { max-width: 500px; }
.register-box { max-width: 600px; }
.contact-box { max-width: 1000px; }

}

/* ===================================================================
   Modal Specific Styles (Share & Crypto Donation)
=================================================================== */

/* --- Share Modal --- */
.social-share-modal .modal-header {
    border-bottom: none;
    padding: 1.5rem 1.5rem 0.5rem;
}

.social-share-modal .modal-footer {
    border-top: none;
}

.share-url-box {
    display: flex;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.share-url-input {
    flex-grow: 1;
    border: none;
    padding: 0.75rem;
    background-color: transparent;
    color: #495057;
}
.share-url-input:focus {
    outline: none;
    box-shadow: none;
}

.copy-url-btn {
    background-color: #e9ecef;
    border: none;
    padding: 0.75rem;
    color: #1a2a5c;
    cursor: pointer;
    transition: background-color 0.2s;
}
.copy-url-btn:hover {
    background-color: #dee2e6;
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.social-icon-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 5px;
    color: white !important; /* important to override Bootstrap link colors */
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon-btn i {
    margin-right: 0.75rem;
    font-size: 1.5rem;
    width: 24px; /* Ensure consistent icon alignment */
    text-align: center;
}

.btn-facebook { background-color: #3b5998; }
.btn-twitter { background-color: #1da1f2; }
.btn-whatsapp { background-color: #25d366; }
.btn-reddit { background-color: #ff4500; }
.btn-pinterest { background-color: #bd081c; }
.btn-linkedin { background-color: #0077b5; }
.btn-telegram { background-color: #26A5E4; }
.btn-tumblr { background-color: #35465c; }
.btn-email { background-color: #6c757d; }

.social-icon-btn:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-2px);
}

/* --- Crypto Donation Modal --- */
.donation-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.crypto-option {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.crypto-option:hover {
    border-color: #1a2a5c;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.crypto-logo {
    height: 50px;
    margin-bottom: 1rem;
}

.crypto-address {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 0.75rem;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all; /* Allow long addresses to wrap */
    margin: 1rem 0;
}

.copy-address-btn {
    background-color: #e9ecef;
    border: none;
    color: #1a2a5c;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.copy-address-btn:hover {
    background-color: #dee2e6;
}

.donation-note {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

@media (max-width: 768px) {
    .donation-methods {
        grid-template-columns: 1fr;
}
}