/* === Tryb ciemny (domyślny) === */
body {
    background: #1a1a2e;
    min-height: 100vh;
    padding: 20px 0;
    transition: background 0.3s ease;
}

body.light-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1200px;
}

/* === Karty === */
.card {
    background: #16213e;
    border: 1px solid #2d3561;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #e0e0e0;
    transition: all 0.3s ease;
}

body.light-mode .card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #212529;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card-title {
    color: #ffffff;
    border-bottom: 2px solid #0f3460;
    padding-bottom: 10px;
}

body.light-mode .card-title {
    color: #212529;
    border-bottom: 2px solid #e0e0e0;
}

/* === Formularze === */
.form-label {
    color: #b8b8d1;
    font-weight: 500;
}

body.light-mode .form-label {
    color: #495057;
}

.form-control, .form-select {
    background: #0f3460;
    border: 1px solid #2d3561;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

body.light-mode .form-control,
body.light-mode .form-select {
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #495057;
}

.form-control:focus, .form-select:focus {
    background: #0f3460;
    border-color: #5a67d8;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(90, 103, 216, 0.25);
}

body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
    background: #ffffff;
    border-color: #80bdff;
    color: #495057;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control::placeholder {
    color: #6b7280;
}

body.light-mode .form-control::placeholder {
    color: #6c757d;
}

textarea.form-control {
    background: #0f3460;
    color: #e0e0e0;
}

body.light-mode textarea.form-control {
    background: #ffffff;
    color: #495057;
}

/* === Mały tekst pomocniczy (FIX dla Bootstrap) === */
.form-help-text {
    color: #9ca3af !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

body.light-mode .form-help-text {
    color: #6c757d !important;
}

/* === Podgląd === */
.preview-box {
    background: #0f3460;
    border: 2px dashed #5a67d8;
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
    white-space: pre-wrap;
    color: #e0e0e0;
    transition: all 0.3s ease;
    line-height: 1.8;
}

body.light-mode .preview-box {
    background: #f8f9fa;
    border: 2px dashed #6c757d;
    color: #212529;
}

.preview-box strong {
    color: #a5b4fc;
    font-weight: 600;
}

body.light-mode .preview-box strong {
    color: #4c51bf;
}

/* === Przyciski === */
.btn-copy {
    background: #28a745;
    color: white;
    font-weight: bold;
    border: none;
}

.btn-copy:hover {
    background: #218838;
    color: white;
}

.btn-danger {
    background: #dc3545;
    border: none;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #138496;
    color: white;
}

/* === Nagłówki === */
.text-white {
    color: #ffffff !important;
}

h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

body.light-mode h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* === Przełącznik trybu === */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    background: #4c51bf;
    transform: scale(1.05);
}

/* === Autocomplete === */
.autocomplete-items {
    position: absolute;
    border: 1px solid #2d3561;
    background: #16213e;
    max-height: 300px;
    overflow-y: auto;
    z-index: 99;
    width: calc(100% - 30px);
    border-radius: 5px;
    margin-top: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

body.light-mode .autocomplete-items {
    background: #ffffff;
    border: 1px solid #ced4da;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #2d3561;
    color: #e0e0e0;
}

body.light-mode .autocomplete-items div {
    border-bottom: 1px solid #e0e0e0;
    color: #495057;
}

.autocomplete-items div:hover {
    background-color: #0f3460;
}

body.light-mode .autocomplete-items div:hover {
    background-color: #f8f9fa;
}

.autocomplete-active {
    background-color: #0f3460 !important;
}

body.light-mode .autocomplete-active {
    background-color: #e9ecef !important;
}

.form-check {
    padding-left: 1.5em;
}

.form-check-input {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    color: #e0e0e0;
}

body.light-mode .form-check-label {
    color: #495057;
}
/* === Stopka informacyjna === */
.privacy-footer {
    margin-top: 30px;
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

body.light-mode .privacy-footer {
    color: #6c757d;
}

/* Klasy pomocnicze dla show/hide */
.hidden,
div.hidden,
#copyStatus.hidden,
#custom-platform-container.hidden {
    display: none !important;
    visibility: hidden !important;
}

.visible {
    display: block !important;
}

.opacity-low {
    opacity: 0.7;
}