* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

body {
    font-family: inherit;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8fafc;
    color: #1e293b;
}

.container {
    background-color: white;
    padding: 20px;
    margin-top: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: #3b82f6;
    border-radius: 2px;
}

.permit-entry {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.permit-entry:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.date-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.permit-type {
    min-width: 140px;
    width: auto;
}

input[type="date"] {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 160px;
    font-family: inherit;
    color: #1e293b;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="date"]:not(:focus):not(:valid) {
    color: #94a3b8;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 180px;
    background-color: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select:not([value]):not(:focus),
select[value=""]:not(:focus) {
    color: #94a3b8;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#calculate-btn {
    background-color: #3b82f6;
    color: white;
    float: right;
}

#calculate-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

#add-btn {
    background-color: #10b981;
    color: white;
}

#add-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.remove-btn {
    background-color: #ef4444;
    color: white;
    margin-left: 15px;
}

.remove-btn:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.remove-btn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.result-box {
    margin: 40px auto 0;
    padding: 40px;
    border-radius: 16px;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 85%;
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid #e2e8f0;
    display: none;
}

.result-box.visible {
    display: block;
}

.result-header {
    font-size: 1.5em;
    margin-bottom: 32px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    padding-bottom: 16px;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
}

.result-main {
    font-size: 2.8em;
    margin: 32px 0;
    font-weight: 700;
    color: #3b82f6;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: baseline;
    line-height: 1.2;
}

.result-main span:first-child {
    font-size: 1.2em;
    color: #0f172a;
}

.result-main span:last-child {
    font-size: 0.4em;
    color: #64748b;
    font-weight: 500;
}

.result-details {
    text-align: center;
    font-size: 1em;
    color: #64748b;
    margin: 16px 0;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 8px;
    display: inline-block;
}

.progress-info {
    background: #f8fafc;
    padding: 32px;
    border-radius: 12px;
    margin: 32px 0;
    border: 1px solid #e2e8f0;
    position: relative;
}

.progress-info > div:first-child {
    color: #64748b;
    font-size: 0.95em;
    margin-bottom: 16px;
}

.progress-info > div:last-child {
    font-size: 1.8em;
    font-weight: 600;
    color: #0f172a;
}

.success {
    background: white;
    border-color: #10b981;
}

.success .result-header {
    color: #10b981;
}

.success .result-header::after {
    background: #10b981;
}

.success .result-main {
    color: #10b981;
}

.error {
    background: white;
    border-color: #ef4444;
}

.error .result-header {
    color: #ef4444;
}

.error .result-header::after {
    background: #ef4444;
}

.error .result-main {
    color: #ef4444;
}

.info-links {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #3b82f6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.9em;
    white-space: nowrap;
}

.info-link:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.info-text {
    display: none;
}

@media (min-width: 768px) {
    .info-text {
        display: inline;
    }
}

@media (max-width: 768px) {
    .container {
        /* padding-top: 80px; */
        margin-top: 40px;
        margin-bottom: 40px;
    }

    h1 {
        margin-bottom: 1.5rem;
    }

    .info-links {
        position: fixed;
        top: 20px;
        right: 20px;
        bottom: auto;
        z-index: 100;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .info-link {
        padding: 6px 12px;
        font-size: 0.8em;
        background-color: #3b82f6;
        color: white;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }

    .info-link:hover {
        background-color: #2563eb;
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .info-text {
        display: inline;
        font-size: 0.9em;
        color: white;
    }

    .info-link .info-text {
        display: inline;
    }

    .permit-entry {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .date-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    input[type="date"],
    select {
        width: 100%;
        min-width: unset;
    }

    .permit-type {
        width: 100%;
        margin-top: 10px;
        background-position: right 16px center;
    }

    .remove-btn {
        align-self: flex-end;
        margin-top: 8px;
    }

    #add-btn,
    #calculate-btn {
        width: 100%;
        margin: 8px 0;
    }

    #calculate-btn {
        float: none;
    }

    .result-box {
        width: 100%;
        padding: 24px;
        margin-top: 24px;
        border-radius: 12px;
    }

    .result-header {
        font-size: 1.2em;
        margin-bottom: 24px;
    }

    .result-main {
        font-size: 2em;
        margin: 24px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .result-main span {
        text-align: center;
    }

    .result-details {
        width: 100%;
        margin: 12px 0;
    }

    .progress-info {
        padding: 20px;
        margin: 24px 0;
    }

    .progress-info > div:last-child {
        font-size: 1.5em;
    }

    .approximate-date {
        padding: 12px;
        margin-top: 16px;
    }
    
    .date-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .info-links {
        top: 16px;
        right: 16px;
    }

    .info-link {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .result-main {
        font-size: 1.8em;
    }

    .progress-info {
        padding: 16px;
    }
}

.info-text-box {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #1e293b;
}

.info-text-box a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.1);
    transition: all 0.2s ease;
}

.info-text-box a:hover {
    background-color: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.info-text-box strong {
    color: #0f172a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .info-text-box {
        padding: 12px 16px;
        font-size: 0.9em;
        margin-bottom: 20px;
    }
}

.approximate-date {
    margin-top: 24px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.approximate-date > div:first-child {
    color: #64748b;
    font-size: 0.95em;
    margin-bottom: 12px;
}

.date-value {
    font-size: 1.4em;
    font-weight: 600;
    color: #0f172a;
    margin: 8px 0;
}

.date-note {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 12px;
    font-style: italic;
}

.language-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #3b82f6;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    border: none;
}

.language-toggle:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.language-toggle img {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .language-toggle {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .language-toggle img {
        width: 16px;
        height: 16px;
    }
}

.bug-report-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    z-index: 1000;
}

.bug-report-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.06);
}

.bug-report-button svg {
    width: 24px;
    height: 24px;
}