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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

html {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Floating Action Buttons */
.floating-btn {
    position: fixed;
    z-index: 1000;
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.floating-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.floating-btn:active {
    transform: scale(0.95);
}

.floating-btn.hidden {
    display: none;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Screen Management */
.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make home and settings screens scrollable on small screens */
#home-screen.active,
#settings-screen.active {
    align-items: flex-start;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Table view should not be scrollable */
#table-view.active {
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.screen-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    width: 100%;
    margin: auto;
    box-sizing: border-box;
}

.screen-content h1 {
    font-size: 48px;
    margin-bottom: 40px;
    color: #ffffff;
}

/* Home Screen */
.practice-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.practice-item {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.practice-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.practice-name {
    font-size: 24px;
    font-weight: 500;
}

/* Settings Screen */
.settings-group {
    margin: 30px 0;
    text-align: left;
}

.settings-group label {
    display: block;
    font-size: 18px;
    margin-bottom: 12px;
    color: #ffffff;
}

.settings-group input[type="color"] {
    width: 100%;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.practice-options-settings {
    margin: 40px 0 30px 0;
    padding: 30px 0;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.practice-options-settings h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffffff;
}

.practice-options-content {
    text-align: left;
}

/* Table View */
.table-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.table-container svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100vw;
    max-height: 100vh;
}

.ball-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ball-container svg {
    position: absolute;
    pointer-events: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #2a2a2a;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.modal-content h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #ffffff;
}

.modal-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
    text-align: left;
}

.option-group label {
    display: flex;
    align-items: center;
    font-size: 18px;
    color: #ffffff;
    cursor: pointer;
}

.option-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .screen-content h1 {
        font-size: 36px;
    }

    .practice-name {
        font-size: 20px;
    }

    .floating-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}
