* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.main-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Setup Page */
.setup-container {
    text-align: center;
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr; /* Force LTR for consistent visual order [Globe] [ENG] [AR] [HE] */
}

.globe-icon {
    font-size: 1.5rem;
    filter: grayscale(100%);
    opacity: 0.7;
}

.lang-buttons {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #ffffff;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: #999;
}

.lang-btn.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.setup-container h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    margin-top: 40px;
}

.input-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 20px;
    text-align: center;
}

/* RTL text alignment */
[dir="rtl"] .input-group {
    text-align: center;
}

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
}

.input-group input {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
}

/* Increment Buttons Container */
.increment-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Keep increment buttons in same order for RTL */
[dir="rtl"] .increment-buttons {
    direction: ltr;
}

/* Action Buttons - used for increment and 25% buttons */
.action-btn {
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f0f0f0;
}

.action-btn.active {
    background: #000000;
    color: #ffffff;
}

.start-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
}

.start-btn:hover {
    opacity: 0.8;
}

/* Display Page - Centered Design */
.display-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.center-content {
    display: flex;
    align-items: center;
    gap: 100px;
}

/* RTL Reverse - clock on left, info on right */
.rtl-reverse {
    flex-direction: row-reverse;
}

.exam-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

/* RTL alignment for info items */
[dir="rtl"] .info-item {
    align-items: flex-start;
}

.info-item .label {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #666;
}

.info-item .value {
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1;
}

.clock-panel {
    text-align: center;
}

.clock-display {
    font-size: 20rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -10px;
}

.clock-caption {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-top: 10px;
}

/* RTL caption alignment */
[dir="rtl"] .clock-caption {
    letter-spacing: 0;
}

/* Flatpickr Custom */
.flatpickr-input {
    background-color: white !important;
}

/* Responsive adjust */
@media (max-width: 1000px) {
    .center-content {
        flex-direction: column;
        gap: 50px;
    }

    .rtl-reverse {
        flex-direction: column;
    }

    .clock-display {
        font-size: 10rem;
        letter-spacing: -2px;
    }
}
