* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f2f5f8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

main {
    background: #fff;
    position: relative;
    padding: 30px;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#lang-switcher {
    position: absolute;
    top: -35px;
    right: 10px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 6px;
}

#lang-switcher button {
    background: #2b6cb0;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 12px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
    transition: background 0.2s;
    box-shadow: 0 2px 8px #0002;
    outline: none;
    min-width: 36px;
    text-align: center;
}

#lang-switcher button:hover,
#lang-switcher button.active {
    background: #2c5282;
}


h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #1a202c;
}

form label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #4a5568;
}

form input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
}

button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: #2b6cb0;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #2c5282;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 15px;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    color: #4a5568;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
}

.checkbox-container input:checked + .checkmark {
    background-color: #3182ce;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked + .checkmark::after {
    display: block;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#result {
    margin-top: 30px;
}

.result-card {
    margin-top: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease-in-out;
}

.result-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.result-tracking {
    font-size: 20px;
    font-weight: bold;
    word-break: break-word;
    color: #1a202c;
    margin-bottom: 12px;
}

.result-details {
    list-style: none;
    padding-left: 0;
}

.result-details li {
    font-size: 16px;
    margin-bottom: 6px;
}

.result-details li span {
    font-weight: 600;
    color: #2d3748;
}

.error-msg {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 6px;
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.courier-track-btn {
    display: inline-block;
    background: #2b6cb0;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 6px 16px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    margin: 8px 0 0 0;
    transition: background 0.2s;
    box-shadow: 0 2px 8px #0002;
    outline: none;
    min-width: 110px;
    text-align: center;
    text-decoration: none !important;
}
.courier-track-btn:hover {
    background: #205080;
    color: #fff !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #e2e8f0;
    }

    main {
        background: #2d3748;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }

    h1 {
        color: #edf2f7;
    }

    form label {
        color: #cbd5e0;
    }

    input[type="text"] {
    background-color: #4a5568;
    color: #f7fafc;
    border: 1px solid #718096;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    input[type="text"]::placeholder {
        color: #a0aec0;
    }

    input[type="text"]:focus {
        outline: none;
        border-color: #63b3ed;
        box-shadow: 0 0 0 2px rgba(99, 179, 237, 0.3);
    }

    input:-webkit-autofill,
    input:-webkit-autofill:focus {
        background-color: #4a5568 !important;
        color: #f7fafc !important;
        -webkit-text-fill-color: #f7fafc !important;
        transition: background-color 0s;
        box-shadow: 0 0 0px 1000px #4a5568 inset !important;
    }

    .checkbox-container {
        color: #cbd5e0;
    }

    .checkmark {
        background-color: #4a5568;
    }

    .checkbox-container input:checked + .checkmark {
        background-color: #63b3ed;
    }

    button {
        background: #3182ce;
    }

    button:hover {
        background: #2c5282;
    }

    .result-card {
        background: #3b4252; /* jaśniejsze tło */
        border-color: #5a6372;
        color: #f1f5f9;
    }

    .result-header {
        color: #ffffff;
    }

    .result-tracking {
        color: #ffffff; /* jaśniejszy numer */
    }

    .result-details li {
        color: #e2e8f0;
    }

    .result-details li span {
        color: #cbd5e0;
    }
}
