html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
}

[dir="rtl"] {
    font-family: Tahoma, Arial, sans-serif;
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.content {
    padding: 0;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.app-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
}

[dir="rtl"] .app-header {
    justify-content: flex-start;
}

.language-toggle {
    position: relative;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 20px;
    padding: 0;
    width: 100px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.language-toggle:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.language-toggle:active {
    transform: scale(0.98);
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: none;
}

[dir="rtl"] .language-toggle {
    direction: ltr;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1s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OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.calendar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.main-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.current-time-section {
    margin-bottom: 3rem;
}

.current-time-section h2 {
    text-align: center;
    color: #34495e;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.time-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calendar-display {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.calendar-display:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.calendar-display.persian {
    border-top: 3px solid #3498db;
}

.calendar-display.gregorian {
    border-top: 3px solid #2ecc71;
}

.calendar-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.timezone-selector {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timezone-selector label {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timezone-dropdown {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
}

.timezone-dropdown:hover {
    border-color: #bdc3c7;
}

.timezone-dropdown:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calendar-date {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.calendar-time {
    font-size: 2rem;
    color: #3498db;
    font-weight: 300;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.converter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.converter-card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.converter-card h3 {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-field input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.input-field input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-field input:hover {
    border-color: #bdc3c7;
}

.convert-button {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.convert-button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.convert-button:active {
    transform: translateY(0);
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 0.875rem;
    text-align: center;
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e8ed;
}

.result-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
}

[dir="rtl"] .calendar-display {
    text-align: right;
}

[dir="rtl"] .timezone-selector {
    align-items: center;
}

[dir="rtl"] .input-field {
    text-align: right;
}

[dir="rtl"] .input-field label {
    text-align: right;
}

[dir="rtl"] .input-field input {
    text-align: right;
    direction: ltr;
}

[dir="rtl"] .result-box {
    text-align: right;
}

[dir="rtl"] .error-message {
    text-align: right;
}

[dir="rtl"] .converter-card h3 {
    text-align: center;
}

[dir="rtl"] .main-title {
    text-align: center;
}

[dir="rtl"] .current-time-section h2 {
    text-align: center;
}

[dir="rtl"] .calendar-label {
    text-align: center;
}

[dir="rtl"] .calendar-date {
    direction: ltr;
    text-align: center;
}

[dir="rtl"] .calendar-time {
    direction: ltr;
    text-align: center;
}

[dir="rtl"] .result-label {
    text-align: center;
}

[dir="rtl"] .result-value {
    direction: ltr;
    text-align: center;
}

@media (max-width: 768px) {
    .calendar-container {
        padding: 1rem;
    }

    .main-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .time-display,
    .converter-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .calendar-date {
        font-size: 1.25rem;
    }

    .calendar-time {
        font-size: 1.5rem;
    }

    .app-header {
        padding: 1rem;
    }
}