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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.wheel-container {
    position: relative;
    display: inline-block;
    margin: 20px 0;
    width: 100%;
    max-width: 750px;
    aspect-ratio: 1 / 1;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
}

#wheel {
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff4757;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

.spin-button {
    background: #ff4757;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin: 20px 0;
}

.spin-button:hover:not(:disabled) {
    background: #ff6b81;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4);
}

.spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.back-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.back-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.view {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.view.hidden {
    display: none;
}

.config-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slices-input {
    text-align: left;
}

.slices-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

#slicesText {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: Arial, sans-serif;
    resize: vertical;
    margin-bottom: 15px;
}

#slicesText:focus {
    outline: none;
    border-color: #667eea;
}

.update-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.update-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.list-management {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.list-management label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

#listName {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: Arial, sans-serif;
    margin-bottom: 10px;
}

#listName:focus {
    outline: none;
    border-color: #45B7D1;
}

.storage-buttons {
    display: flex;
    gap: 10px;
}

.storage-button {
    flex: 1;
    background: #45B7D1;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.storage-button:hover {
    background: #3a9fb8;
    transform: translateY(-1px);
}

.storage-button.delete-button {
    background: #ff6b6b;
}

.storage-button.delete-button:hover {
    background: #ff5252;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.result-text {
    margin: 20px 0;
    font-size: 1.1em;
    color: #333;
}

.result-text ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.result-text li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.result-text li:last-child {
    border-bottom: none;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.export-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-button {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #ff6b81;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
