/* Server Rental Styles */

.server-rental {
    padding: 3rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

.rental-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

.rental-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rental-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.2);
}

.card-header {
    padding: 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.card-content {
    padding: 2rem 1.5rem;
}

/* Map Selection */
.map-selector {
    margin-bottom: 2rem;
}

.selected-map {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-map.has-map {
    border: 2px solid #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.no-map-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.map-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.map-preview img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.map-info h4 {
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.map-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.popular-maps h4 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-size: 1rem;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.map-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.map-card:hover {
    transform: translateY(-2px);
    border-color: #22c55e;
}

.map-card.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.map-image {
    position: relative;
    height: 120px;
    background: #333;
}

.map-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-info {
    padding: 1rem;
}

.map-card-info h5 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 0.9rem;
}

.map-card-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Server Configuration */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #22c55e;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #22c55e;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 80px;
    text-align: right;
    color: #22c55e;
    font-weight: 600;
}

.form-help {
    margin: 0.5rem 0 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Cost Calculator */
.cost-breakdown {
    margin-bottom: 1.5rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cost-item:last-child {
    border-bottom: none;
}

.cost-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 2px solid #22c55e;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #22c55e;
}

.balance-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.balance-remaining {
    color: #22c55e;
    font-weight: 600;
}

.balance-remaining.insufficient {
    color: #ef4444;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.rental-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.info-item i {
    color: #22c55e;
    width: 16px;
    height: 16px;
}

/* Current Servers */
.current-servers {
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.current-servers h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.server-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.server-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.server-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.server-status.running {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.server-status.stopped {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.server-status.starting {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.server-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #22c55e;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.server-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Map Selection Modal */
.modal-search {
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: #22c55e;
    color: #fff;
}

.filter-tab.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .rental-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .rental-grid {
        grid-template-columns: 1fr;
    }
    
    .maps-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
    
    .rental-info {
        grid-template-columns: 1fr;
    }
    
    .server-info {
        grid-template-columns: 1fr;
    }
}

/* Credits Display */
.credits-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    color: #22c55e;
    font-weight: 600;
}

.credits-display i {
    width: 16px;
    height: 16px;
}

/* Connection Modal */
.connection-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.connection-modal {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #22c55e;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-content {
    padding: 1.5rem;
}

.server-info-card {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.server-info-card h4 {
    margin: 0 0 0.5rem 0;
    color: #22c55e;
    font-size: 1.5rem;
}

.map-name {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.server-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.connection-details {
    margin-bottom: 1.5rem;
}

.connection-details h5 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.1rem;
}

.connection-string {
    margin-bottom: 1rem;
}

.connection-string label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.copy-field {
    display: flex;
    gap: 0.5rem;
}

.connection-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #22c55e;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1rem;
}

.copy-btn {
    padding: 0.75rem;
    background: #22c55e;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.connection-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.detail-item span {
    color: #22c55e;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.connection-instructions {
    margin-bottom: 1.5rem;
}

.connection-instructions h5 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.1rem;
}

.instruction-list {
    margin: 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.instruction-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-actions .btn {
    flex: 1;
    min-width: 180px;
}

/* Responsive for connection modal */
@media (max-width: 768px) {
    .connection-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .connection-details-grid {
        grid-template-columns: 1fr;
    }
    
    .server-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        min-width: auto;
    }
}
