/* Core styles and reset */

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

:root {
    /* Color palette */
    --color-black: #000000;
    --color-near-black: #0a0a0a;
    --color-dark-gray: #1a1a1a;
    --color-medium-gray: #2d2d2d;
    --color-light-gray: #4a4a4a;
    --color-text-subtle: #666666;
    --color-text-light: #888888;
    --color-warning: #ffc107;

    /* Brushed metal effect controls */
    --brush-intensity: 0.7;
    --brush-contrast: 0.8;
    --brush-line-spacing: 2px;
    --brush-highlight: 0.25;
    --metal-base-color: #1a1a1a;
    --metal-light-color: #4a4a4a;

    /* Frame dimensions */
    --frame-width: 35px;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--color-black);
    color: var(--color-text-light);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: fixed;
    touch-action: manipulation;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
    opacity: 0;
}

/* Prevent iOS zoom on double-tap */
button,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent text selection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow selection for input elements */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, var(--metal-base-color), var(--color-medium-gray));
    border: 1px solid var(--color-light-gray);
    border-radius: 12px;
    padding: 30px 25px;
    min-width: 280px;
    max-width: 90vw;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1001;
}

.modal-title {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: 15px;
    text-align: center;
}

.modal-message {
    font-size: 15px;
    font-weight: 300;
    color: var(--color-text-subtle);
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.modal-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin: 10px 0;
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-family);
    color: var(--color-text-light);
    background: linear-gradient(135deg, var(--color-medium-gray), var(--color-light-gray));
    border: 1px solid var(--color-light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    -webkit-tap-highlight-color: transparent;
}

.modal-button:active {
    transform: scale(0.98);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-button-primary {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    border-color: #b71c1c;
    color: #ffffff;
}

.modal-button-secondary {
    background: linear-gradient(135deg, var(--color-medium-gray), var(--color-dark-gray));
    border-color: var(--color-medium-gray);
}
