/* ===== OUTILS PAGE STYLES ===== */

.tools-page {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    min-height: 100vh;
}

/* Tools Hero */
.tools-hero {
    padding: 120px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(79, 172, 254, 0.1) 0%, transparent 100%);
}

.tools-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.tools-hero h1 i {
    color: #4facfe;
    margin-right: 15px;
}

.tools-hero p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

/* Tools Navigation */
.tools-nav {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.tools-nav .container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tool-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-tab:hover {
    background: rgba(79, 172, 254, 0.1);
    border-color: rgba(79, 172, 254, 0.3);
    color: #fff;
}

.tool-tab.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-color: transparent;
    color: #0a0a1a;
    font-weight: 600;
}

.tool-tab i {
    font-size: 1.1rem;
}

/* Tools Content */
.tools-content {
    padding: 40px 0 80px;
}

.tool-section {
    display: none;
}

.tool-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.tool-header h2 i {
    color: #4facfe;
    margin-right: 10px;
}

.tool-header p {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== BONUS HUNT STYLES ===== */
.bonushunt-controls {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-sizing: border-box;
}

/* Start Config */
.bh-start-config {
    text-align: center;
}

.bh-start-input {
    max-width: 400px;
    margin: 0 auto;
}

.bh-start-input label {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.bh-start-input label i {
    color: #4facfe;
    margin-right: 10px;
}

.input-with-btn {
    display: flex;
    gap: 10px;
}

.input-with-btn input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px 20px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.input-with-btn input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

.input-with-btn input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.bh-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

@media (max-width: 1100px) {
    .bh-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .bh-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 450px) {
    .bh-stats {
        grid-template-columns: 1fr;
    }
}

.bh-stat {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 18px 12px;
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    box-sizing: border-box;
}

.bh-stat.highlight {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    border: 1px solid rgba(79, 172, 254, 0.3);
}

.bh-stat-label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.bh-stat-label i {
    margin-right: 6px;
    color: #4facfe;
}

.bh-stat-sub {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.6);
}

.bh-stat-value {
    display: block;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
}

.bh-stat.highlight .bh-stat-value {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bh-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Bonus Hunt Table */
.bonushunt-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

.bonushunt-table {
    width: 100%;
    border-collapse: collapse;
}

.bonushunt-table th {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bonushunt-table td {
    padding: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bonushunt-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bonushunt-table .empty-row td {
    text-align: center;
    padding: 50px;
    color: rgba(255, 255, 255, 0.4);
}

.bonushunt-table .empty-row i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.bonushunt-table .win-cell {
    color: #00e676;
    font-weight: 600;
}

.bonushunt-table .multi-cell {
    color: #4facfe;
    font-weight: 600;
}

.bonushunt-table .action-btns {
    display: flex;
    gap: 8px;
}

.bonushunt-table .btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bonushunt-table .btn-icon.edit {
    background: rgba(79, 172, 254, 0.2);
    color: #4facfe;
}

.bonushunt-table .btn-icon.delete {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

.bonushunt-table .btn-icon:hover {
    transform: scale(1.1);
}

/* Win input in table */
.bonushunt-table .win-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    width: 100px;
    font-size: 0.95rem;
}

.bonushunt-table .win-input:focus {
    outline: none;
    border-color: #4facfe;
}

/* ===== SPIN WHEEL STYLES ===== */
.wheel-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .wheel-container {
        grid-template-columns: 1fr;
    }
}

.wheel-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.wheel-pointer {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(79, 172, 254, 0.3),
                inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.wheel-spin-btn {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: 4px solid #fff;
    color: #0a0a1a;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.wheel-spin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(79, 172, 254, 0.6);
}

.wheel-spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wheel-controls {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
}

.wheel-entries h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wheel-entries h3 i {
    color: #4facfe;
}

.entry-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.entry-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
}

.entry-input-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.entry-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.entries-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.entries-list::-webkit-scrollbar {
    width: 6px;
}

.entries-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.entries-list::-webkit-scrollbar-thumb {
    background: rgba(79, 172, 254, 0.5);
    border-radius: 3px;
}

.entries-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    color: #fff;
}

.entries-list li .entry-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.entries-list li .entry-name {
    flex: 1;
}

.entries-list li .entry-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.entries-list li .entry-remove:hover {
    color: #ff5252;
}

.wheel-result {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.wheel-result h3 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.winner-display {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: winnerPulse 1s ease infinite;
}

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

/* ===== BLACKJACK STRATEGY TABLE STYLES ===== */
.blackjack-strategy {
    max-width: 100%;
}

.strategy-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    margin-bottom: 25px;
}

.strategy-table-full {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.strategy-table-full th {
    background: linear-gradient(135deg, #1a2a4a 0%, #0d1a30 100%);
    color: #4facfe;
    font-weight: 700;
    padding: 12px 6px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(79, 172, 254, 0.2);
}

.strategy-table-full th.corner-cell {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0a0a1a;
    font-size: 0.9rem;
    font-weight: 800;
    min-width: 80px;
    vertical-align: middle;
}

.strategy-table-full th.dealer-header {
    background: linear-gradient(135deg, #2a3a5a 0%, #1a2a40 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.strategy-table-full td {
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.strategy-table-full td.row-label {
    background: linear-gradient(135deg, #1a2a4a 0%, #0d1a30 100%);
    color: #fff;
    font-weight: 700;
    text-align: center;
    min-width: 60px;
}

.strategy-table-full td.row-label.hard {
    color: #fff;
}

.strategy-table-full td.row-label.pair {
    color: #4facfe;
}

.strategy-table-full td.row-label.soft {
    color: #00f2fe;
}

/* Cell colors based on action - matching the image exactly */
.strategy-table-full td.stay {
    background: #dc3545;
    color: #fff;
}

.strategy-table-full td.hit {
    background: #28a745;
    color: #fff;
}

.strategy-table-full td.double {
    background: #ffc107;
    color: #000;
}

.strategy-table-full td.split {
    background: #007bff;
    color: #fff;
}

.strategy-table-full td.surrender-hit {
    background: #6f42c1;
    color: #fff;
    font-size: 0.75rem;
}

.strategy-table-full td.surrender-stay {
    background: #e83e8c;
    color: #fff;
    font-size: 0.75rem;
}

/* Legend */
.bj-legend {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bj-legend h4 {
    color: #4facfe;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 0.9rem;
}

.legend-color {
    width: 35px;
    height: 22px;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
}

.legend-color.stay {
    background: #dc3545;
}

.legend-color.hit {
    background: #28a745;
}

.legend-color.double {
    background: #ffc107;
}

.legend-color.split {
    background: #007bff;
}

.legend-color.surrender-hit {
    background: #6f42c1;
}

.legend-color.surrender-stay {
    background: #e83e8c;
}

.strategy-note {
    padding: 15px 20px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    text-align: center;
}

.strategy-note p {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
}

.strategy-note p:first-child {
    color: #dc3545;
    font-size: 1.1rem;
}

.strategy-note .note-small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.strategy-note i {
    margin-right: 8px;
}

/* ===== AUTOCOMPLETE STYLES ===== */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a3a;
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    display: none;
}

.autocomplete-list.active {
    display: block;
}

.autocomplete-list li {
    padding: 10px 15px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.autocomplete-list li:hover,
.autocomplete-list li.selected {
    background: rgba(79, 172, 254, 0.2);
}

.autocomplete-list li:first-child {
    border-radius: 8px 8px 0 0;
}

.autocomplete-list li:last-child {
    border-radius: 0 0 8px 8px;
}

.autocomplete-list::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.autocomplete-list::-webkit-scrollbar-thumb {
    background: rgba(79, 172, 254, 0.5);
    border-radius: 3px;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3a 0%, #0a0a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
}

.modal-content.modal-small {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    color: #fff;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0a0a1a;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 82, 82, 0.4);
}

.btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== LOGIN REQUIRED MODAL ===== */
.login-required-content {
    text-align: center;
    padding: 20px 0;
}

.login-required-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.login-required-content .login-required-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.login-required-content .form-actions {
    justify-content: center;
    flex-wrap: wrap;
}

#login-required-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

#login-required-modal .modal-header h2 i {
    color: #ffc107;
}

/* ===== CONFIRM CLEAR MODAL ===== */
.confirm-clear-content {
    text-align: center;
    padding: 20px 0;
}

.confirm-clear-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.confirm-clear-content .confirm-clear-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.confirm-clear-content .form-actions {
    justify-content: center;
    flex-wrap: wrap;
}

#confirm-clear-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

#confirm-clear-modal .modal-header h2 i {
    color: #ff5252;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tools-hero h1 {
        font-size: 1.8rem;
    }

    .tool-tab {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .bh-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bonushunt-table th,
    .bonushunt-table td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .wheel-wrapper {
        padding: 20px;
    }

    #wheel-canvas {
        width: 300px;
        height: 300px;
    }

    .wheel-spin-btn {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }

    .strategy-table {
        min-width: 400px;
    }

    .strategy-table th,
    .strategy-table td {
        padding: 8px 5px;
        font-size: 0.8rem;
    }

    .bj-legend {
        gap: 10px;
        padding: 15px;
    }

    .legend-item {
        font-size: 0.85rem;
    }

    .legend-color {
        width: 24px;
        height: 20px;
    }
}
