/* Professional Crypto Theme with Bootstrap Inspiration */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e6f7ff, #b3e5fc);
    color: #37474f;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    width: 100%;
    max-width: 1600px;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 121, 107, 0.1);
    border: 1px solid rgba(0, 172, 193, 0.2);
    margin: 0 auto;
}

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

h2 {
    color: #00796b;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-icon {
    width: 35px;
    height: 35px;
    background: url('https://img.icons8.com/ios-filled/50/00796b/user.png') no-repeat center;
    background-size: contain;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.user-icon:hover {
    box-shadow: 0 0 12px rgba(0, 121, 107, 0.4);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.2);
    padding: 10px;
    z-index: 100;
    min-width: 150px;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a, .user-dropdown span {
    display: block;
    padding: 8px 15px;
    color: #37474f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-dropdown a:hover, .user-dropdown span:hover {
    background: rgba(0, 172, 193, 0.1);
    color: #00796b;
}

h3, h4 {
    color: #00796b;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
}

.tab-btn {
    padding: 10px 25px;
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.4);
}

.tab-btn.active {
    background: linear-gradient(90deg, #00796b, #00acc1);
    transform: scale(1.03);
}

.tab-content {
    display: none;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
}

.tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .tab-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        width: 100%;
    }

    .container {
        padding: 20px;
    }
}

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

label {
    display: block;
    color: #37474f;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

input[type="text"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    color: #37474f;
    font-size: 14px;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: #00acc1;
    box-shadow: 0 0 8px rgba(0, 172, 193, 0.2);
    outline: none;
}

button, a.button {
    padding: 8px 16px;
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

button:hover, a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 172, 193, 0.4);
}

button.delete {
    background: linear-gradient(90deg, #ef5350, #f06292);
}

button.delete:hover {
    box-shadow: 0 5px 15px rgba(239, 83, 80, 0.4);
}

.message {
    background: rgba(0, 230, 118, 0.1);
    color: #00c853;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.error {
    background: rgba(239, 83, 80, 0.1);
    color: #ef5350;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.user-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 30% 30% 40%; /* Username, Password, Action */
    align-items: center;
    transition: all 0.3s ease;
    font-size: 13px;
}

.user-item.user-header {
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    font-weight: 600;
}

.user-item span {
    padding: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    border-right: 1px solid #e0e0e0;
}

.user-item span:last-child {
    border-right: none;
}

.user-item:hover {
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.1);
}

.tool-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
}

.tool-column-header, .tool-column-item {
    display: grid;
    grid-template-columns: 25% 30% 25% 20%; /* Tool Name, Site, Expiry, Action */
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    align-items: center;
}

.tool-column-header {
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    font-weight: 600;
}

.tool-column-item {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.tool-column-header span, .tool-column-item span {
    padding: 5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-right: 1px solid #e0e0e0;
}

.tool-column-header span:last-child, .tool-column-item span:last-child {
    border-right: none;
}

.tool-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tool-column-item:hover {
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.1);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: #fff;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 121, 107, 0.2);
    position: relative;
    overflow: hidden;
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.close-modal {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: #f8f9fa;
    transform: scale(1.1);
}

#modal-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 80px);
}

/* Custom scrollbar for modal content */
#modal-content::-webkit-scrollbar {
    width: 8px;
}

#modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#modal-content::-webkit-scrollbar-thumb {
    background: #00acc1;
    border-radius: 4px;
}

#modal-content::-webkit-scrollbar-thumb:hover {
    background: #00796b;
}

/* For Firefox */
#modal-content {
    scrollbar-width: thin;
    scrollbar-color: #00acc1 #f1f1f1;
}

.sub-panel {
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.1);
}

.analytics-table {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
}

.analytics-header, .analytics-row {
    display: grid;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    align-items: center;
}

.analytics-header {
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    font-weight: 600;
}

.analytics-row {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.analytics-header span, .analytics-row span {
    padding: 5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-right: 1px solid #e0e0e0;
}

.analytics-header span:last-child, .analytics-row span:last-child {
    border-right: none;
}

.analytics-row span.live {
    color: #00c853;
    font-weight: 600;
}

.compact-table {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compact-table .header {
    display: grid;
    grid-template-columns: 50% 50%;
    background: linear-gradient(90deg, #00acc1, #26c6da);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.compact-table .row {
    display: grid;
    grid-template-columns: 50% 50%;
    background: #fff;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 12px;
    align-items: center;
}

.compact-table span {
    padding: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.card-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.card {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #fff, #e0f7fa);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.2);
}

.card-icon {
    width: 35px;
    height: 35px;
    background-size: contain;
    background-repeat: no-repeat;
}

.card-content h4 {
    color: #00796b;
    font-size: 16px;
    margin-bottom: 5px;
}

.card-content span {
    font-size: 20px;
    font-weight: 600;
    color: #37474f;
}
.analytics-table .analytics-header, .analytics-table .analytics-row {
    display: grid;
    grid-template-columns: 50% 50%; /* For 2 columns */
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    align-items: center;
}
.loading-text {
    font-size: 14px;
    color: #37474f;
    font-style: italic;
}
#cookie_limit_field input[type="number"] {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    color: #37474f;
    font-size: 14px;
    transition: all 0.3s ease;
}
#cookie_limit_field input[type="number"]:focus {
    border-color: #00acc1;
    box-shadow: 0 0 8px rgba(0, 172, 193, 0.2);
    outline: none;
}
.analytics-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.analytics-cards .card {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, #fff, #e0f7fa);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.analytics-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.2);
}
.analytics-cards .card-icon {
    width: 35px;
    height: 35px;
    background-size: contain;
    background-repeat: no-repeat;
}
.analytics-cards .card-content h4 {
    color: #00796b;
    font-size: 16px;
    margin-bottom: 5px;
}
.analytics-cards .card-content span {
    font-size: 20px;
    font-weight: 600;
    color: #37474f;
}
 input[type="date"] {
            width: 100%;
            max-width: 200px;
            padding: 10px;
            background: #fff;
            border: 1px solid #b0bec5;
            border-radius: 8px;
            color: #37474f;
            font-size: 14px;
            transition: all 0.3s ease;
        }
        input[type="date"]:focus {
            border-color: #00acc1;
            box-shadow: 0 0 8px rgba(0, 172, 193, 0.2);
            outline: none;
        }
        .pagination {
            margin-top: 20px;
            display: flex;
            justify-content: center;
            gap: 10px;
        }
        .pagination a {
            padding: 8px 12px;
            background: #00acc1;
            color: #fff;
            text-decoration: none;
            border-radius: 20px;
            font-size: 13px;
            transition: all 0.3s ease;
        }
        .pagination a:hover {
            background: #00796b;
            transform: translateY(-2px);
        }
        .pagination a.active {
            background: #00796b;
            font-weight: 600;
        }
        #dashboard-analytics .header, #dashboard-analytics .row {
            grid-template-columns: 40% 30% 30%;
        }
        .available-tools-btn {
            padding: 8px 16px;
            background: linear-gradient(90deg, #4caf50, #81c784);
            color: #fff;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .available-tools-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
        }
        .user-menu {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .available-tools-table {
            width: 100%;
            margin-top: 20px;
            border-collapse: collapse;
        }
        .available-tools-table th, .available-tools-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }
        .available-tools-table th {
            background: linear-gradient(90deg, #00acc1, #26c6da);
            color: #fff;
            font-weight: 600;
        }
        .available-tools-table tr:hover {
            background: #f5f5f5;
        }
        .loading-text {
            font-size: 14px;
            color: #37474f;
            font-style: italic;
        }
.json-button {
    padding: 8px 12px;
    margin: 5px;
    background: linear-gradient(90deg, #00acc1, #26c6da);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}
.json-button:hover {
    background: linear-gradient(90deg, #00796b, #00acc1);
}
.json-button.selected {
    background: linear-gradient(90deg, #00796b, #004d40);
    font-weight: 600;
}
.delete-json {
    margin-left: 5px;
    color: #ff1744;
    cursor: pointer;
}        
.proxy-settings-btn {
    padding: 8px 16px;
    background: linear-gradient(90deg, #7b1fa2, #ab47bc);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.proxy-settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 31, 162, 0.4);
}
.close-modal {
    color: #ef5350;
    font-weight: bold;
}
.close-modal:hover {
    color: #d32f2f;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    font-size: 14px;
}
.form-control:focus {
    border-color: #00acc1;
    box-shadow: 0 0 8px rgba(0, 172, 193, 0.2);
    outline: none;
}

/* Additional modal improvements for better scrolling experience */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    #modal-content {
        max-height: calc(95vh - 80px);
        padding: 15px;
    }
}

/* Ensure form elements in modal are properly spaced */
#modal-content .form-group {
    margin-bottom: 20px;
}

#modal-content .form-group:last-child {
    margin-bottom: 0;
}

/* Improve textarea scrolling in modal */
#modal-content textarea {
    resize: vertical;
    min-height: 100px;
}

/* Better button spacing in modal */
#modal-content .button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Loading state styling */
.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}
/* Proxy Config Container */
.proxy-config-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.proxy-config-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
}

.proxy-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 15px;
}

.proxy-config-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.proxy-config-item label {
    font-weight: 600;
    color: #495057;
    min-width: 60px;
}

.proxy-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.proxy-input:focus {
    border-color: #00acc1;
    box-shadow: 0 0 8px rgba(0, 172, 193, 0.2);
    outline: none;
}

/* Proxy Status Display */
#proxy-status-display {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    flex-grow: 1; /* Allow it to take available space */
}

.proxy-status-live {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.proxy-status-dead {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.proxy-status-checking {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Adjustments for the check proxy button and loading text alignment */
#check-proxy-loading {
    display: inline-block; /* Ensure it takes space */
    vertical-align: middle; /* Align with button */
}
