/* Main container structure */
.lucky-wheel-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.lucky-wheel-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px;
}

/* Wheel container */
.lucky-wheel-canvas-container {
    flex: 0 0 auto;
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    margin-right: 20px;
}

.lucky-wheel-canvas-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Information area */
.lucky-wheel-info {
    flex: 1;
    min-width: 250px;
}

/* Button styles */
.lucky-wheel-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 16px;
}

.lucky-wheel-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Result display */
.lucky-wheel-result {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: none;
}

.lucky-wheel-loading {
    color: #666;
}

.lucky-wheel-error {
    color: #dc3232;
}

.lucky-wheel-success {
    color: #46b450;
}

/* Prize list */
.lucky-wheel-prizes ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.lucky-wheel-prizes li {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lucky-wheel-prize-color {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 5px;
}

/* History */
.lucky-wheel-history {
    margin-top: 30px;
    overflow-x: auto;
}

.lucky-wheel-history-table {
    width: 100%;
    border-collapse: collapse;
}

.lucky-wheel-history-table th,
.lucky-wheel-history-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* Pagination styles */
.lucky-wheel-history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 8px;
}

.pagination-btn {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.pagination-btn:hover {
    background-color: #0073aa;
    color: #fff;
}

.pagination-btn.disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.pagination-info {
    padding: 6px 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    color: #666;
}

/* Address popup */
.lucky-wheel-address-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.lucky-wheel-address-popup form {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
}

.lucky-wheel-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.lucky-wheel-form-actions button {
    flex: 1;
    padding: 10px;
}

/* Common dialog styles */
#lucky-wheel-dialog-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.lucky-wheel-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    width: 400px;
}

.lucky-wheel-dialog-content {
    padding: 20px;
    text-align: center;
}

.lucky-wheel-dialog-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: bold;
}

.lucky-wheel-dialog-content p {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.5;
}

.lucky-wheel-dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.lucky-wheel-dialog-button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.lucky-wheel-dialog-ok {
    background-color: #0073aa;
    color: #fff;
}

.lucky-wheel-dialog-ok:hover {
    background-color: #005a87;
}

.lucky-wheel-dialog-cancel,
.lucky-wheel-dialog-close {
    background-color: #f0f0f0;
    color: #333;
}

.lucky-wheel-dialog-cancel:hover,
.lucky-wheel-dialog-close:hover {
    background-color: #e0e0e0;
}

/* Result display related */
.lucky-wheel-result-inner {
    text-align: center;
}

.lucky-wheel-close-result {
    margin-top: 15px;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* Win and lose styles */
.lucky-wheel-dialog.lucky-wheel-win {
    border: 5px solid gold;
    animation: win-glow 1.5s infinite alternate;
}

.lucky-wheel-dialog.lucky-wheel-lose {
    border: 3px solid #999;
}

.lucky-wheel-result-title.win {
    color: #e02020;
    font-size: 24px;
    margin-bottom: 15px;
}

.lucky-wheel-result-title.lose {
    color: #666;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Address link button */
.lucky-wheel-address-actions {
    margin: 15px 0;
    text-align: center;
}

.lucky-wheel-address-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e02020;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lucky-wheel-address-link:hover {
    background-color: #c01010;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.lucky-wheel-dialog.lucky-wheel-win .lucky-wheel-address-link {
    animation: pulse 1.5s infinite;
}

.lucky-wheel-submit-address {
    background-color: #e02020;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.lucky-wheel-submit-address:hover {
    background-color: #c01010;
}

/* Animation definitions */
@keyframes win-glow {
    from {
        box-shadow: 0 0 10px gold;
    }
    to {
        box-shadow: 0 0 20px gold, 0 0 30px #e02020;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive design */
@media screen and (min-width: 768px) {
    .lucky-wheel-container {
        gap: 40px;
    }
    
    .lucky-wheel-canvas-container {
        margin-right: 30px;
    }
}

@media screen and (max-width: 767px) {
    .lucky-wheel-container {
        flex-direction: column;
        align-items: center;
    }
    
    .lucky-wheel-canvas-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .lucky-wheel-info {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .lucky-wheel-container {
        padding: 10px;
    }
    
    .lucky-wheel-wrapper {
        flex-direction: column !important;
    }
    
    .lucky-wheel-canvas-container {
        flex: 0 0 auto !important;
        max-width: 100% !important;
        margin: 0 auto;
    }
    
    .lucky-wheel-info {
        min-width: 100%;
    }
    
    .lucky-wheel-button {
        display: block;
        width: 100%;
        padding: 15px;
        font-size: 18px;
    }
    
    .lucky-wheel-address-form textarea {
        width: 100%;
    }
    
    .lucky-wheel-address-form button {
        width: 100%;
        margin-top: 10px;
        padding: 12px;
    }
    
    .lucky-wheel-history-pagination {
        text-align: center;
        margin: 15px 0;
    }
    
    .lucky-wheel-history-pagination a {
        padding: 8px 12px;
        margin: 0 5px;
    }
}

@media screen and (max-width: 480px) {
    .lucky-wheel-dialog {
        width: 85%;
    }
    
    .lucky-wheel-dialog-content {
        padding: 15px;
    }
    
    .lucky-wheel-dialog-button {
        padding: 10px 15px;
        font-size: 16px;
    }
}