/* From touchspin.css */
.bootstrap-touchspin .input-group-btn-vertical { position: relative; white-space: nowrap; width: 1%; vertical-align: middle; display: table-cell; }
.bootstrap-touchspin .input-group-btn-vertical > .btn { display: block; float: none; width: 100%; max-width: 100%; padding: 8px 10px; margin-left: -1px; position: relative; }
.bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-up { border-radius: 0; border-top-right-radius: 4px; }
.bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-down { margin-top: -2px; border-radius: 0; border-bottom-right-radius: 4px; }
.bootstrap-touchspin .input-group-btn-vertical i { position: absolute; top: 3px; left: 5px; font-size: 14px; font-weight: bold; }

/* Horizontal TouchSpin Buttons Styling */
.bootstrap-touchspin .input-group-btn .btn {
    padding: 10px 20px;
    font-size: 24px;
    font-weight: bold;
    min-width: 50px;
}

/* Mobile-First Layout & Theme */
body { 
    padding-top: 0; 
    background-color: #fcfcfc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}
.container { 
    max-width: 500px; 
    margin: 0 auto;
    text-align: center;
}

/* Forms & Inputs */
.form-group { 
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px; 
    width: 100%;
}
.form-control { 
    flex: 1;
    max-width: 250px;
    height: 50px; 
    font-size: 20px !important; 
    font-weight: bold; 
    text-align: center;
    border-radius: 8px;
}
.bootstrap-touchspin { 
    flex: 1;
    max-width: 250px;
    margin: 0;
}

/* Icons */
.img1, .img2 { 
    width: 60px; 
    margin-right: 15px;
    margin-bottom: 0;
    display: block;
    flex-shrink: 0;
}
.flipped {
    transform: scaleX(-1);
}
.img-header {
    max-width: 70%;
    height: auto;
    margin-bottom: 10px;
}

/* Game Elements */
.player-display { 
    background: white;
    border: 2px solid #ddd; 
    border-radius: 15px;
    padding: 15px; 
    display: block; 
    margin: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.player-display h1 {
    margin: 0;
    font-size: 28px;
}
.action-text { 
    color: #333; 
    font-size: 24px; 
    line-height: 1.3;
    margin: 15px 0;
    padding: 20px;
    font-weight: 500;
    background: #fff9f9;
    border: 2px dashed #ffcccc;
    border-radius: 12px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    position: relative;
}
.refresh-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #FB0101;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ffcccc;
    border-radius: 50%;
    user-select: none;
    z-index: 10;
}
.refresh-icon:hover {
    opacity: 1;
    transform: rotate(45deg);
}
.refresh-icon:active {
    transform: rotate(180deg);
}
.highlight { color: #FB0101; font-weight: bold; }

/* Navigation & Buttons */
.setup-actions, .game-navigation {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.btn-link-img {
    background: transparent !important;
    border: none !important;
    padding: 0;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
}
.btn-link-img:active {
    opacity: 0.8;
}
.timer-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}
.timer-buttons img { 
    cursor: pointer;
    height: auto;
    transition: transform 0.1s;
}
.timer-buttons img:active { transform: scale(0.95); }
.game-navigation img { cursor: pointer; height: auto; }

/* Clock Adjustments for Mobile */
.your-clock {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    transform: scale(0.85); /* Slightly smaller to save space */
}
.your-clock .flip-clock-wrapper {
    margin: 0 !important; /* Force remove default FlipClock margins */
}
.flip-clock-divider.minutes .flip-clock-label, 
.flip-clock-divider.seconds .flip-clock-label { margin-top: 2px !important; }
.flip-clock-wrapper .flip-clock-divider.hours { display: none !important; }

/* Screens */
#game-screen { display: none; }

/* Modal Styling */
.modal-content { border-radius: 15px; }
.modal-body ol li { margin-bottom: 10px; font-size: 16px; text-align: left; }

/* Toggle Switch Row */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    max-width: 250px;
}
.toggle-label {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}
.switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    margin: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #FB0101; }
input:checked + .slider:before { transform: translateX(22px); }
