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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d1117, #161b22);
    color: #c9d1d9;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(33, 38, 45, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 164, 108, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    text-align: left;
    flex: 1;
}

.header-right {
    text-align: right;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-name {
    color: #58a6ff;
    font-weight: 500;
    font-size: 1rem;
}

.logout-btn {
    background: linear-gradient(135deg, #f85149, #da3633);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #da3633, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 81, 73, 0.3);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left {
        text-align: center;
    }
    
    .header-right {
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }
}

.header h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #58a6ff, #30a46c);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: none;
}

.header p {
    color: #8b949e;
    font-size: 1.1rem;
}

.status-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

.tunnel-card {
    background: rgba(33, 38, 45, 0.8);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 164, 108, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tunnel-card:hover {
    transform: translateY(-5px);
    border-color: rgba(48, 164, 108, 0.6);
    box-shadow: 0 10px 30px rgba(48, 164, 108, 0.2);
}

.tunnel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #58a6ff, #30a46c);
}

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

.tunnel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tunnel-card.disconnected {
    opacity: 0.7;
    border-color: rgba(248, 81, 73, 0.3);
}

.tunnel-card.disconnected:hover {
    border-color: rgba(248, 81, 73, 0.6);
    box-shadow: 0 10px 30px rgba(248, 81, 73, 0.2);
}

.tunnel-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f0f6fc;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-online {
    background: rgba(48, 164, 108, 0.2);
    color: #30a46c;
    border: 1px solid rgba(48, 164, 108, 0.4);
}

.status-offline {
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, 0.4);
}

.tunnel-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    background: rgba(22, 27, 34, 0.8);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(48, 54, 61, 0.5);
}

.info-label {
    font-size: 0.85rem;
    color: #7d8590;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0f6fc;
}

.instructions {
    background: rgba(33, 38, 45, 0.8);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 164, 108, 0.3);
}

.instructions h2 {
    color: #58a6ff;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step {
    margin-bottom: 25px;
}

.step h3 {
    color: #f0f6fc;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.command {
    background: rgba(22, 27, 34, 0.9);
    padding: 15px 80px 15px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #f0f6fc;
    border-left: 4px solid #58a6ff;
    margin: 10px 0;
    overflow-x: auto;
    white-space: pre-wrap;
    position: relative;
    word-break: break-all;
}

.command-container {
    position: relative;
    margin: 10px 0;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(88, 166, 255, 0.2);
    border: 1px solid #58a6ff;
    color: #58a6ff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(88, 166, 255, 0.3);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

.copy-btn.copied {
    background: rgba(88, 166, 255, 0.8);
    color: #0d1117;
}

.ssh-url {
    color: #58a6ff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-bottom: 1px dotted #58a6ff;
}

.ssh-url:hover {
    color: #79c0ff;
    border-bottom: 1px solid #79c0ff;
    text-shadow: 0 0 5px rgba(121, 192, 255, 0.3);
}

.disabled-url {
    color: #7d8590;
    font-style: italic;
}

.remove-btn {
    background: rgba(248, 81, 73, 0.2);
    border: 1px solid #f85149;
    color: #f85149;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.remove-btn:hover {
    background: rgba(248, 81, 73, 0.3);
    box-shadow: 0 0 10px rgba(248, 81, 73, 0.3);
    transform: scale(1.1);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(88, 166, 255, 0.1);
    border-left: 4px solid #58a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .tunnel-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .tunnel-info {
        grid-template-columns: 1fr;
    }
    
    .instructions {
        padding: 20px;
    }
}

/* Modal de Confirmação de Exclusão */
.delete-modal,
.logout-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-modal.show,
.logout-modal.show {
    opacity: 1;
}

.delete-modal.hide,
.logout-modal.hide {
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

/* Bordas específicas para cada tipo de modal */
.delete-modal .modal-content {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.logout-modal .modal-content {
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.delete-modal.show .modal-content,
.logout-modal.show .modal-content {
    transform: scale(1);
}

.delete-modal.hide .modal-content,
.logout-modal.hide .modal-content {
    transform: scale(0.8);
}

.modal-header {
    padding: 24px 24px 0 24px;
    text-align: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

/* Cores específicas dos cabeçalhos */
.delete-modal .modal-header h3 {
    color: #ef4444;
}

.logout-modal .modal-header h3 {
    color: #3b82f6;
}

.modal-body {
    padding: 20px 24px;
    text-align: center;
}

.modal-body p {
    color: #e2e8f0;
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.warning-text {
    color: #fbbf24 !important;
    font-size: 0.95rem !important;
    background: rgba(251, 191, 36, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-top: 16px !important;
}

.modal-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-cancel {
    background: rgba(71, 85, 105, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.btn-cancel:hover {
    background: rgba(71, 85, 105, 1);
    transform: translateY(-1px);
}

.btn-confirm {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Botão de logout com cor azul */
.logout-confirm {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: 1px solid rgba(59, 130, 246, 0.5) !important;
}

.logout-confirm:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Responsivo para modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 350px;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }
}
