@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap');
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f8f9fa;
    color: #2d3436;
}

body, html, #app {
    background-color: #f8f9fa;
    color: #2d3436;
    height: 100%;
}

.page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Home Page Styling */
.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
    width: 100%;
    gap: 24px;
}

.start-button {
    padding: 16px 42px;
    font-size: 18px;
    background-color: #2d8659;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.start-button:hover {
    background-color: #1d6e48;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.3);
}

.start-button:active {
    transform: translateY(0);
}

/* Timer Page Styling */
.timer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
    gap: 32px;
    position: relative;
    width: 100%;
    padding: 20px;
}

.timer-display {
    font-size: clamp(80px, 18vw, 220px);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #2d8659;
    letter-spacing: 4px;
    text-align: center;
    line-height: 1;
}

.timer-blinds-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 800px;
}

.blind-display {
    font-size: clamp(28px, 8vw, 80px);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #2d3436;
    text-align: center;
    flex: 0 1 auto;
    min-width: 100px;
}

.blind-label {
    font-size: clamp(10px, 2vw, 14px);
    color: #5a6c7d;
    margin-top: 6px;
    opacity: 0.8;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.control-button {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    border: 2px solid #2d8659;
    background-color: transparent;
    color: #2d8659;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 600;
}

.control-button:hover:not(:disabled) {
    background-color: #2d8659;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
}

.control-button:active:not(:disabled) {
    transform: translateY(0);
}

.control-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: #d4d7dc;
    color: #d4d7dc;
}

.nav-button {
    width: 60px;
    height: 60px;
    font-size: 24px;
    border-color: #5a6c7d;
    color: #5a6c7d;
}

.nav-button:hover:not(:disabled) {
    background-color: #5a6c7d;
    border-color: #5a6c7d;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(90, 108, 125, 0.2);
    transform: translateY(-2px);
}

.icon {
    display: inline-block;
}

.back-button {
    padding: 11px 22px;
    font-size: 13px;
    background-color: transparent;
    color: #2d8659;
    border: 2px solid #2d8659;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.back-button:hover {
    background-color: #2d8659;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
    transform: translateY(-2px);
}

.back-button:active {
    transform: translateY(0);
}

.settings-icon {
    position: absolute;
    top: 24px;
    right: 24px;
    background-color: transparent;
    border: 2px solid #2d8659;
    color: #2d8659;
    border-radius: 4px;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-weight: 600;
}

.settings-icon:hover {
    background-color: #2d8659;
    border-color: #2d8659;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
    transform: translateY(-2px);
}

.settings-icon:active {
    transform: translateY(0);
}

/* Game Settings Page Styling */
.settings-container {
    background-color: #f8f9fa;
    color: #2d3436;
    min-height: 100vh;
    padding: 40px 20px;
    font-family: 'JetBrains Mono', monospace;
}

.settings-container h1 {
    text-align: center;
    color: #2d8659;
    font-size: 28px;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.settings-container h2 {
    color: #2d8659;
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.rounds-list {
    max-width: 900px;
    margin: 0 auto;
}

.round-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.round-item:hover {
    background-color: #f8f9fa;
    border-color: #2d8659;
    box-shadow: 0 2px 8px rgba(45, 134, 89, 0.1);
}

.round-info {
    flex: 1;
}

.round-number {
    font-size: 15px;
    font-weight: 600;
    color: #2d8659;
    margin-bottom: 8px;
}

.round-details {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #5a6c7d;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 9px;
    color: #5a6c7d;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.detail-value {
    font-size: 20px;
    color: #2d3436;
    font-weight: 700;
}

.round-details span {
    background-color: #f0f2f5;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    font-weight: 500;
}

.round-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-left: 40px;
}

.action-button {
    width: 32px;
    height: 32px;
    border: 1px solid #d4d7dc;
    background-color: transparent;
    color: #5a6c7d;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.action-button:hover:not(:disabled) {
    background-color: #f0f2f5;
    border-color: #5a6c7d;
    color: #2d3436;
}

.action-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.action-button.edit-btn {
    border-color: #0066cc;
    color: #0066cc;
}

.action-button.edit-btn:hover:not(:disabled) {
    background-color: #e6f0ff;
    border-color: #0052a3;
    color: #0052a3;
}

.action-button.delete-btn {
    border-color: #dc2626;
    color: #dc2626;
}

.action-button.delete-btn:hover:not(:disabled) {
    background-color: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}

.no-rounds {
    text-align: center;
    color: #5a6c7d;
    font-size: 15px;
    padding: 24px;
}

.add-round-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 24px;
    background-color: #2d8659;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

.add-round-button:hover {
    background-color: #1d6e48;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
}

.add-round-button:active {
    transform: translateY(0);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2d8659;
    font-size: 18px;
}

.modal-content p {
    margin: 0 0 24px 0;
    color: #5a6c7d;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #5a6c7d;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2d3436;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #2d8659;
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
}

.form-error {
    color: #dc2626;
    margin-bottom: 20px;
    font-weight: 500;
    min-height: 20px;
    font-size: 13px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.save-button {
    flex: 1;
    padding: 10px;
    background-color: #2d8659;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

.save-button:hover {
    background-color: #1d6e48;
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
    transform: translateY(-2px);
}

.save-button:active {
    transform: translateY(0);
}

.cancel-button {
    flex: 1;
    padding: 10px;
    background-color: transparent;
    color: #5a6c7d;
    border: 1px solid #d4d7dc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

.cancel-button:hover {
    background-color: #f0f2f5;
    border-color: #2d3436;
    color: #2d3436;
}

.cancel-button:active {
    transform: translateY(0);
}

.settings-footer {
    margin-top: 40px;
    text-align: center;
}

.save-all-button {
    padding: 12px 36px;
    background-color: #2d8659;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

.save-all-button:hover {
    background-color: #1d6e48;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 134, 89, 0.2);
}

.save-all-button:active {
    transform: translateY(0);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #2d8659;
}

.btn-primary {
    color: #fff;
    background-color: #2d8659;
    border-color: #1d6e48;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(45, 134, 89, 0.25);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2d8659;
}

.invalid {
    outline: 1px solid #dc2626;
}

.validation-message {
    color: #dc2626;
}

#blazor-error-ui {
    background: #fef2f2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.08);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #7f1d1d;
    border-top: 1px solid #fecaca;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #fef2f2;
    padding: 1rem 1rem 1rem 3.7rem;
    color: #7f1d1d;
    border: 1px solid #fecaca;
    border-radius: 4px;
    margin: 1rem 0;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* PIN Entry Component Styling */
.pin-entry-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.pin-entry-container h2 {
    font-size: 16px;
    color: #5a6c7d;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.pin-boxes {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.pin-box {
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #2d8659;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2d8659;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0;
}

.pin-box::placeholder {
    color: transparent;
}

.pin-box::-webkit-outer-spin-button,
.pin-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-box[type=number] {
    -moz-appearance: textfield;
}

.pin-box:focus {
    outline: none;
    border-color: #1d6e48;
    background-color: #f0f8f4;
    box-shadow: 0 0 0 3px rgba(45, 134, 89, 0.1);
}

.pin-error {
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    min-height: 20px;
    letter-spacing: 0.3px;
}

.start-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #d4d7dc;
    border-color: #d4d7dc;
}

.start-button:disabled:hover {
    background-color: #d4d7dc;
    transform: none;
    box-shadow: none;
}
