@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- POPRAWKI GLOBALNE RESPONSYWNOŚCI --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

/* --- ZMIENNE KOLORYSTYCZNE --- */
:root {
    --bg-color: #f4f6f9;
    --bg-dots: #d0d9e5;
    --text-color: #1a1a1a;
    --text-muted: #666;
    --accent-color: #012f63;
    --hover-bg: rgba(0,0,0,.05);
    --btn-hover-bg: #012f63;
    --btn-hover-text: #ffffff;
    --glass-bg: rgba(255,255,255,.88);
    --glass-border: rgba(255,255,255,.8);
    --card-bg: rgba(255,255,255,.75);
    --border-line: rgba(0,0,0,.1);
    --section-border: rgba(1, 47, 99, 0.1);
    --footer-bg: rgba(255,255,255,.5);
    --scb-bg: #fff;
    --scb-text: #333;
    --scb-title: #000;
    --scb-decline-bg: #f0f0f0;
    --scb-decline-hover: #e0e0e0;
    --scb-decline-text: #555;
    --panel-border: #eee;
}

body.dark-mode {
    --bg-color: #012f63;
    --bg-dots: rgba(255, 255, 255, 0.15);
    --text-color: #f0f4f8;
    --text-muted: #b0c4de;
    --accent-color: #ffffff;
    --hover-bg: rgba(255,255,255,.1);
    --btn-hover-bg: rgba(255,255,255,0.2);
    --btn-hover-text: #ffffff;
    --glass-bg: rgba(1, 35, 75, 0.88);
    --glass-border: rgba(255,255,255,.15);
    --card-bg: rgba(255,255,255,.05);
    --border-line: rgba(255,255,255,.2);
    --section-border: rgba(255, 255, 255, 0.2);
    --footer-bg: rgba(0,0,0,.2);
    --scb-bg: #011f42;
    --scb-text: #b0c4de;
    --scb-title: #ffffff;
    --scb-decline-bg: rgba(255,255,255,.1);
    --scb-decline-hover: rgba(255,255,255,.2);
    --scb-decline-text: #ffffff;
    --panel-border: rgba(255,255,255,.15);
}

body {
    font-family: 'Poppins', sans-serif; margin: 0; padding: 0 0 80px 0; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    background-color: var(--bg-color); background-image: radial-gradient(var(--bg-dots) 1px, transparent 1px);
    background-size: 26px 26px; background-attachment: fixed; color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- PRZYCISK DAROWIZNY --- */
.sticky-donate-btn {
    position: fixed; top: 50%; right: 0; background-color: #012f63; color: #ffffff !important;
    text-decoration: none; padding: 25px 12px; font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600;
    border-radius: 12px 0 0 12px; box-shadow: -4px 0 15px rgba(0, 0, 0, 0.25);
    writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 99990; letter-spacing: 1px; 
    display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid rgba(255,255,255,0.1); border-right: none;
}
body.dark-mode .sticky-donate-btn { background-color: #001f44; }
.sticky-donate-btn:hover { background-color: #024591; padding-top: 35px; box-shadow: -6px 0 20px rgba(0, 0, 0, 0.4); }
.sticky-donate-btn i { transform: rotate(-180deg); font-size: 16px; color: #ff4757; }

/* --- MENU --- */
.fd-glass-nav-wrapper { position: fixed; top: 25px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 95%; z-index: 99999; }
.fd-glass-nav { background: var(--glass-bg); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 80px; padding: 5px 35px; display: flex; justify-content: center; align-items: center; gap: 40px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); position: relative; transition: all 0.4s ease;}
.fd-nav-left { flex: 1; display: flex; justify-content: flex-start; align-items: center; }
.fd-nav-center { display: flex; justify-content: center; align-items: center; }
.fd-nav-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.fd-nav-logo { display: block; text-decoration: none; }
.fd-nav-logo img { height: 85px; width: auto; display: block; transition: transform 0.3s; }
.fd-nav-logo:hover img { transform: scale(1.05); }

body .logo-light { display: none !important; }
body .logo-dark { display: block !important; }
body:not(.dark-mode) .logo-light { display: block !important; }
body:not(.dark-mode) .logo-dark { display: none !important; }

.fd-nav-links { display: flex; gap: 15px; list-style: none; margin: 0; padding: 0; align-items: center; border-left: 2px solid var(--border-line); padding-left: 30px; }
.fd-nav-links a { color: var(--text-color); background-color: var(--hover-bg); text-decoration: none; font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 25px; transition: all .3s ease; display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }
.fd-social-icons { display: flex; gap: 8px; align-items: center; border-left: 2px solid var(--border-line); padding-left: 30px; margin-left: 20px;}
.fd-social-icons a, #theme-toggle { color: var(--text-color); font-size: 16px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background-color: var(--hover-bg); transition: all 0.3s ease; text-decoration: none; border: none; cursor: pointer;}
.fd-nav-links a:hover, .fd-social-icons a:hover, #theme-toggle:hover { background-color: var(--btn-hover-bg); color: var(--btn-hover-text); transform: translateY(-3px); }

/* HAMBURGER */
.fd-nav-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; background: none; border: none; padding: 5px; z-index: 10; margin-left: 15px; }
.fd-nav-toggle span { display: block; width: 30px; height: 3px; background: var(--text-color); transition: 0.3s; border-radius: 3px; }
.fd-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 6px); }
.fd-nav-toggle.active span:nth-child(2) { opacity: 0; }
.fd-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* MENU MOBILNE */
.fd-mobile-menu { position: absolute; top: 105px; left: 0; width: 100%; background: var(--glass-bg); backdrop-filter: blur(20px); border-radius: 20px; padding: 25px 20px; display: flex; flex-direction: column; gap: 5px; opacity: 0; visibility: hidden; transform: translateY(-20px); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 15px 40px rgba(0,0,0,0.15); border: 1px solid var(--glass-border); }
.fd-mobile-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.fd-mobile-link-direct { color: var(--text-color); text-decoration: none; font-size: 16px; font-weight: 700; padding: 12px 15px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; background: var(--hover-bg); margin-top: 8px; transition: all 0.2s; width: 100%; text-align: left; }
.fd-mobile-link-direct:hover { background: var(--btn-hover-bg); color: var(--btn-hover-text); }
.fd-mobile-socials { display: flex; justify-content: center; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-line); }
.fd-mobile-socials a { font-size: 20px; color: var(--bg-color); background: var(--text-color); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; transition: all 0.3s; }
.fd-mobile-socials a:hover { background: var(--accent-color); color: var(--bg-color); transform: translateY(-3px);}

/* --- TREŚĆ --- */
.hero-section { margin-top: 180px; text-align: center; margin-bottom: 40px; padding: 0 20px; }
.hero-section h1 { font-size: 32px; color: var(--accent-color); margin-bottom: 10px; transition: color 0.4s;}
.hero-section p { font-size: 16px; color: var(--text-color); max-width: 600px; margin: 0 auto; line-height: 1.6; transition: color 0.4s;}
.container { width: 100%; max-width: 1200px; padding: 20px; }
.info-box { background: var(--card-bg); border-left: 4px solid var(--accent-color); padding: 15px 20px; border-radius: 8px; margin-bottom: 30px; font-size: 14px; border: 1px solid var(--border-line); color: var(--text-color); transition: all 0.4s;}

/* --- SIATKA KAFELKÓW --- */
.cards-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; width: 100%; }
.converter-card { background: var(--card-bg); backdrop-filter: blur(8px); border: 1px solid var(--glass-border); border-radius: 20px; padding: 35px 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); text-align: center; transition: all 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-decoration: none; }
.converter-card:hover { border-color: var(--accent-color); box-shadow: 0 10px 25px rgba(0,0,0, 0.15); transform: translateY(-5px); background: var(--glass-bg);}
.converter-card h2 { margin-top: 0; color: var(--accent-color); font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 15px;}
.converter-card p { font-size: 13px; color: var(--text-color); margin-bottom: 20px; line-height: 1.5; flex-grow: 1; }

.file-input-wrapper { position: relative; overflow: hidden; display: inline-block; width: 100%; }
.file-input-wrapper input[type=file] { font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; height: 100%; width: 100%; }
.btn { background: #012f63; color: white; border: none; padding: 14px 20px; width: 100%; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; border-radius: 50px; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; }
body.dark-mode .btn { background: #ffffff; color: #012f63; }
.btn:hover { opacity: 0.8; box-shadow: 0 5px 15px rgba(0,0,0, 0.2); }
.btn-green { background: #27ae60 !important; color: white !important;} .btn-green:hover { background: #2ecc71 !important; }
.btn-red { background: #c0392b !important; color: white !important; } .btn-red:hover { background: #e74c3c !important; }
.btn-gray { background: #7f8c8d !important; color: white !important; } .btn-gray:hover { background: #95a5a6 !important; }

.status { margin-top: 15px; font-size: 13px; font-weight: 500; min-height: 20px; width: 100%;}
.progress-bar { width: 100%; background: var(--border-line); border-radius: 10px; overflow: hidden; margin-top: 10px; display: none; }
.progress-fill { height: 8px; background: var(--accent-color); width: 0%; transition: width 0.3s; }

/* --- WIZUALNY EDYTOR PDF (MODAL) --- */
.pdf-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color); backdrop-filter: blur(10px);
    z-index: 1000000; display: none; flex-direction: column;
}
.pdf-modal-header {
    background: var(--scb-bg); padding: 20px 40px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;
    border-bottom: 1px solid var(--panel-border);
}
.pdf-modal-header h2 { margin: 0; color: var(--accent-color); font-size: 20px; }
.pdf-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pdf-modal-actions .btn { width: auto; padding: 10px 20px; font-size: 13px; }
.pdf-modal-info { text-align: center; padding: 10px; color: var(--text-color); font-size: 14px; background: var(--scb-bg); border-bottom: 1px solid var(--panel-border); }

.pdf-pages-container {
    flex-grow: 1; padding: 30px; overflow-y: auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 25px;
    align-content: start;
}
.pdf-thumb {
    position: relative; background: var(--scb-bg); border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: grab; transition: transform 0.2s, box-shadow 0.2s; border: 4px solid transparent;
    display: flex; flex-direction: column; overflow: hidden;
}
.pdf-thumb:active { cursor: grabbing; transform: scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.2); z-index: 10; }
.pdf-thumb canvas { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--panel-border);}
.pdf-thumb .page-num { background: var(--scb-decline-bg); text-align: center; padding: 5px; font-size: 12px; font-weight: 600; color: var(--text-color);}

.pdf-thumb.selected { border-color: #27ae60; }
.pdf-thumb.selected::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; top: 5px; right: 5px; background: #27ae60; color: white;
    width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#modalLoading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18px; font-weight: 600; color: var(--accent-color); display: none; flex-direction: column; align-items: center; gap: 15px; }

footer { text-align: center; margin-top: auto; font-size: 13px; color: var(--text-muted); width: 100%; padding: 20px 15px; border-top: 1px solid var(--border-line); background: var(--footer-bg); transition: all 0.4s ease; }
footer a { color: var(--accent-color); text-decoration: none; font-weight: 600; }

/* RESPONSYWNOŚĆ */
@media (max-width: 1050px) {
    .fd-glass-nav-wrapper { width: 95%; } 
    .fd-glass-nav { justify-content: space-between; padding: 10px 25px; }
    .fd-nav-logo img { height: 60px; } 
    .fd-nav-links { display: none; } 
    .fd-social-icons { display: none; }
    .fd-nav-toggle { display: flex; } 
    .sticky-donate-btn { font-size: 13px; padding: 15px 8px; border-radius: 8px 0 0 8px; } .sticky-donate-btn:hover { padding-top: 25px; }
    .hero-section { margin-top: 150px; }
}
@media (max-width: 768px) { .cards-wrapper { grid-template-columns: 1fr; } .pdf-modal-header { flex-direction: column; } .pdf-modal-actions { justify-content: center; } }

/* --- CIASTECZKA --- */
#scb-banner { position: fixed; bottom: 30px; left: 30px; max-width: 400px; background: var(--scb-bg); color: var(--scb-text); padding: 25px; z-index: 999999; box-shadow: 0 10px 40px rgba(0,0,0,0.15); border-radius: 12px; display: none; border: 1px solid var(--panel-border); animation: slideIn 0.4s ease-out; }
@keyframes slideIn { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
#scb-banner h3 { margin-top: 0; font-weight: 600; font-size: 18px; margin-bottom: 10px; color: var(--scb-title); } #scb-banner p { font-size: 13px; line-height: 1.6; margin-bottom: 20px; } #scb-banner a { color: var(--accent-color); text-decoration: underline; font-weight: 600; }
.scb-buttons { display: flex; gap: 10px; flex-wrap: wrap; } .scb-btn { border: none; padding: 10px 20px; cursor: pointer; border-radius: 6px; font-weight: 600; font-size: 13px; flex: 1; transition: all 0.2s; font-family: 'Poppins', sans-serif;}
.scb-accept { background: #012f63; color: white; border: 1px solid #012f63; } body.dark-mode .scb-accept { background: #ffffff; color: #012f63; border: 1px solid #ffffff; } .scb-accept:hover { opacity: 0.8; } .scb-decline { background: var(--scb-decline-bg); color: var(--scb-decline-text); } .scb-decline:hover { background: var(--scb-decline-hover); }
#scb-revisit-btn { position: fixed; bottom: 30px; left: 30px; width: 50px; height: 50px; background: var(--scb-bg); border-radius: 50%; box-shadow: 0 5px 20px rgba(0,0,0,0.15); cursor: pointer; z-index: 999998; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease; border: 1px solid var(--panel-border); } #scb-revisit-btn:hover { transform: scale(1.1) rotate(15deg); } #scb-revisit-btn svg { width: 24px; height: 24px; fill: var(--scb-title); }